• Data Structure - Java - Tutorials

    Interview Series : Left View of Binary Tree

    Given a Binary Tree, print Left view of it. Left view of a Binary Tree is set of nodes visible when tree is visited from Left side. The task is to complete the function leftView(), which accepts root of the tree as argument. The problem is given in GeeksforGeeks Practice, which is useful for interview prepration as well as helps to learn basics of Data Structure. Left view of following tree is 1 2 4 8.           1       /     \     2        3   /     \    /    \  4     5   6    7   \     8    Example 1: Input:  1 /  \3   …