Amazon interview question

1. Reverse Linked List 2. Generate tree from preorder & postorder