Iterative pre-order traversal using stack

We have seen the in-order traversal of a binary tree. It is a recursive code. Recursion stack can be simulated using an explicit Stack data structure and keeping the function non-recursive. Let us see how: When a function calls itself, its activation record (stack frame) is pushed in the function call stack of memory. The […]
 •  0 comments  •  flag
Share on Twitter
Published on December 25, 2017 08:14
No comments have been added yet.