Closed
Description
In the code below, I think the case of single branch binary trees was not considered. It is checking >2 and >0 but not ==1 yet it uses [1]. We should add a case for single branch (which I realize is not well defined for here since we don't know if it's a left or right branch).
algorithm-archive/chapters/tree_traversal/code/julia/Tree.jl
Lines 28 to 43 in d9d8405