Question DSA-TREE-0075
HardMorris inorder traversal uses O(1) extra space. What does it temporarily modify?
- A.
Left pointers of leaves
- B.
Nothing
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Trees question
Morris inorder traversal uses O(1) extra space. What does it temporarily modify?
Left pointers of leaves
Nothing
Sign up free to see the answer and a step-by-step explanation.
Node values
Right pointers of inorder predecessors, creating threads back to their successors