Tree traversal: Difference between revisions

Content deleted Content added
Depth-first search implementation: add introduction to Depth-first search implementation section
Line 103:
{{unreferenced section|date=June 2013}}
===Depth-first search implementation===
Below isare examples of [[stack]]-based implementation examples for pre-order, post-order and in-order traversal in recursive approach (left) as well as iterative approach (right).
 
Implementations in iterative approach are able to avoid the [[Recursion (computer science)#Recursion versus iteration|drawbacks of recursion]], particularly limitations of stack space and performance issues.