()
| 76 | } |
| 77 | |
| 78 | fn main() { |
| 79 | let root = create_tree(2, 3); |
| 80 | |
| 81 | println!("[#]\nRecursive DFS:"); |
| 82 | dfs_recursive(&root); |
| 83 | println!(); |
| 84 | |
| 85 | println!("[#]\nRecursive Postorder DFS:"); |
| 86 | dfs_recursive_postorder(&root); |
| 87 | println!(); |
| 88 | |
| 89 | println!("[#]\nStack-based DFS:"); |
| 90 | dfs_stack(&root); |
| 91 | println!(); |
| 92 | |
| 93 | println!("[#]\nQueue-based BFS:"); |
| 94 | bfs_queue(&root); |
| 95 | println!(); |
| 96 | |
| 97 | println!("[#]\nRecursive Inorder DFS for Binary Tree:"); |
| 98 | let root_binary = create_tree(3, 2); |
| 99 | dfs_recursive_inorder_btree(&root_binary); |
| 100 | println!(); |
| 101 | } |
nothing calls this directly
no test coverage detected