Amazon interview question

Code a BST, then reverse it