Pocket Gems interview question

Phone interview: First round: Ternary expression to Binary Tree Second Round: Sort Color, Next node in BST