Question DSA-BST-171
HardWhat does a BST iterator using a stack achieve?
- A.
next() in amortised O(1) and O(h) memory
- B.
O(log n) per call always
- 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
Binary Search Trees question
What does a BST iterator using a stack achieve?
next() in amortised O(1) and O(h) memory
O(log n) per call always
Sign up free to see the answer and a step-by-step explanation.
O(n) memory
Random access