• Courses
  • Tutorials
  • DSA
  • Data Science
  • Web Tech
August 23, 2024 |5.4K Views

Print Left View of Binary Tree

Description
Discussion

In this video, given a binary tree, the task is to print the left view of the binary tree. The left view of a Binary Tree is a set of leftmost nodes for every level. 
For example:

Input:   1
            /  \
           3    2
Output: 1 3
Explanation: 1 and 3 are present at the leftmost of their respective level, hence present in the output.

Try it out before watching the implementation of the problem in the video. We recommend watching the video, even if you can solve the problem. You may discover something new. All the best!!!

Do check out:-

Article: https://www.geeksforgeeks.org/print-left-view-binary-tree/
Problem: https://practice.geeksforgeeks.org/problems/left-view-of-binary-tree/1
SDE Sheet: https://www.geeksforgeeks.org/sde-sheet-a-complete-guide-for-sde-preparation/