[lintcode] Flatten Binary Tree to Linked List
Flatten Binary Tree to Linked List Flatten a binary tree to a fake “linked list” in pre-order traversal. Here we use the right pointer in TreeNode as the nextpointer in ListNode. Have you met this question in a real interview? Yes Example 1 \ 1 2 / \ \ 2 […]