Amazon interview question

1. Write a function for reverse of a string, and explain its edge cases 2. Construct a binary tree