Pocket Gems interview question

Basic Binary Search Tree and Array.