Amazon interview question

Transform Binary Tree to LinkedList