Tree: Depth-First Search - Flatten Binary Tree to Linked List
Consider two approaches to flatten a binary tree: (1) Brute force preorder traversal collecting nodes in a list and rebuilding the linked list, and (2) Optimal reverse preorder traversal with a global pointer. When is approach (1) preferable over (2)?
