From 0e69cbdbd7d54483ba44b0052321199774f625ea Mon Sep 17 00:00:00 2001 From: stormofice <58337328+stormofice@users.noreply.github.com> Date: Mon, 23 Aug 2021 17:15:44 +0200 Subject: [PATCH] Change front and top to first --- contents/tree_traversal/code/julia/Tree.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contents/tree_traversal/code/julia/Tree.jl b/contents/tree_traversal/code/julia/Tree.jl index 8e7893cd1..d44345e8d 100644 --- a/contents/tree_traversal/code/julia/Tree.jl +++ b/contents/tree_traversal/code/julia/Tree.jl @@ -47,7 +47,7 @@ function DFS_stack(n::Node) push!(s, n) while(length(s) > 0) - println(top(s).ID) + println(first(s).ID) temp = pop!(s) for child in temp.children push!(s, child) @@ -60,7 +60,7 @@ function BFS_queue(n::Node) enqueue!(q, n) while(length(q) > 0) - println(front(q).ID) + println(first(q).ID) temp = dequeue!(q) for child in temp.children enqueue!(q, child)