I was trying to help a friend out he wanted an algorithm to calculate tree height linearly
so I told him to do a kind of
left right search which is of course O(n^?) whatever, but using loops its doable right
so start at the root keep going left adding the the right child to a container until you get to no more left nodes
then go to the highest right node in the container and repeat until you have visted
the last left child of each node in the container
all while maintaining a max height and current height counter
then repeat the above switiching left and right
I know that would be really slow, but still linear
I kind of just thought it up off of the top of my head, wanted to make sure I didnt point him in the wrong direction, ideas thoughts comments welcome
