Pocket Gems Interview Question

Simple binary tree problem