Skip to content

Commit d8f2741

Browse files
berquistleios
authored andcommitted
Call post-order recursive DFS in Julia. (#335)
1 parent f5060a3 commit d8f2741

File tree

1 file changed

+5
-2
lines changed
  • contents/tree_traversal/code/julia

1 file changed

+5
-2
lines changed

contents/tree_traversal/code/julia/Tree.jl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,14 @@ end
8686
function main()
8787

8888
println("Creating Tree")
89-
root = create_tree(2,3)
89+
root = create_tree(2, 3)
9090

9191
println("Using recursive DFS:")
9292
DFS_recursive(root);
9393

94+
println("Using recursive DFS with post-order traversal:")
95+
DFS_recursive_postorder(root);
96+
9497
println("Using stack-based DFS:")
9598
DFS_stack(root);
9699

@@ -100,7 +103,7 @@ function main()
100103
println("Creating binary tree to test in-order traversal.")
101104
root_binary = create_tree(3,2)
102105
println("Using In-order DFS:")
103-
DFS_recursive_inorder_btree(root_binary)
106+
DFS_recursive_inorder_btree(root_binary)
104107
end
105108

106109
main()

0 commit comments

Comments
 (0)