Print Binary tree in vertical order

Problem Statement Given a Binary tree, print it in vertical order from left to right. Vertical order for the above Binary tree is: Vertical order(root): 2 3 1 5 4 7 8 We could solve this problem by performing a breadth-first or level order traversal on the given tree and using […]