Pocket Gems interview question

Sort colors, binary tree top view.