Skip to content

Call post-order recursive DFS in Julia #335

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions contents/tree_traversal/code/julia/Tree.jl
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,14 @@ end
function main()

println("Creating Tree")
root = create_tree(2,3)
root = create_tree(2, 3)

println("Using recursive DFS:")
DFS_recursive(root);

println("Using recursive DFS with post-order traversal:")
DFS_recursive_postorder(root);

println("Using stack-based DFS:")
DFS_stack(root);

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

main()