Tree: Depth-First Search - Flatten Binary Tree to Linked List
What is the space complexity of the optimal in-place flatten algorithm that uses reverse preorder traversal with a global pointer on a binary tree of n nodes and height h?
15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions