Content deleted Content added
Tag: Reverted |
No edit summary |
||
Line 21:
| ''Post-order (node visited at position blue {{colorbull|#2A7FFF|round|size=180}})'':{{br}} A, C, E, D, B, H, I, G, F.
}}]]
In ''depth-first search'' (DFS), the search tree is deepened as much as possible before going to the next sibling
To traverse binary trees with depth-first search, perform the following operations at each node:<ref>[http://www.cise.ufl.edu/~sahni/cop3530/slides/lec216.pdf ''Binary Tree Traversal Methods'']</ref><ref>{{cite web|url=http://www.programmerinterview.com/index.php/data-structures/preorder-traversal-algorithm/|title=Preorder Traversal Algorithm|access-date=2 May 2015}}</ref>
Line 328 ⟶ 323:
* [http://www.sitepoint.com/hierarchical-data-database/ Storing Hierarchical Data in a Database] with traversal examples in PHP
* [https://web.archive.org/web/20110606032941/http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Managing Hierarchical Data in MySQL]
* [http://www.artfulsoftware.com/mysqlbook/sampler/mysqled1ch20.html Working with Graphs in MySQL]
* [https://favtutor.com/blogs/tree-traversal-python-with-recursion Sample code for recursive tree traversal in Python.]
|