Pocket Gems interview question

Implement a>b?a:b in tree.