Amazon interview question

Two whiteboard coding questions. One about BST and one about string manipulation.