New answers tagged binary-tree
I would check out http://www.fusu.us/2013/07/printing-binary-tree-boundary.html. It uses additional data structures but is but runs in linear time with a single traversal. The stacks used in the linked solution would not be necessary if you were not worried about the order in which the boundary is printed. In this case you could do your favorite linear tree ...
Top 50 recent answers are included