Leetcode #114 Flatten Binary Tree to Linked List
This question is a bit tricky since it mentioned pre-order traversal (root, left, right)
The idea here is to traverse recursively and make the "reordering" as you go.
Thought process:
Traverse left subtree then right subtree
If you encounter a left ...
michelletanpy.hashnode.dev1 min read