Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

README.md

< Previous                  Next >

Related Topics

[Tree] [Design]

Hints

Hint 1 The inorder traversal of a BST gives us the elements in a sorted order.
Hint 2 We can use a stack to simulate the inorder traversal of the BST.
Hint 3 We can use another stack as a buffer to store numbers returned from calls to next and use this buffer whenever prev is called.