My approach: Take inorder traversal of a binary tree. You'll need a custom stack if you want to implement the function with iterative version. On comparing this iterative version with recursive version of the inorder traversal, we find that both methods are using same number of stack frames. Recursive version is just easy and more intuitive.