Iterative Inorder Traversal
Iterative inorder traversal replaces the recursion call stack with an explicit stack. I repeatedly push every left node, process the top node when no further left child exists, and then move to its right subtree. This preserves the exact Left-Root-Right traversal order.
Time complexity: O(n).
Auxiliary space: O(h), where h is tree height.
The explicit stack simulates the recursive call stack.
For a BST, the resulting list is sorted.