Design an algorithm to perform inorder traversal of a binary search tree using only a constant amount of extra space.
We can use \( Morris\ Traversal \) to perform inorder traversal of a binary search tree using only a constant amount of extra space.
Running time = \( O(n) \) since every node is visited once and there is constant amount of operations in each iteration. |