• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests
March 19, 2024 |490 Views
PROBLEM OF THE DAY : 18/03/2024 | Level order traversal
Description
Discussion

Welcome to the daily solving of our PROBLEM OF THE DAY with Yash Dwivedi. We will discuss the entire problem step-by-step and work towards developing an optimized solution. This will not only help you brush up on your concepts of Linked List but also build up problem-solving skills.

In this problem, we are given a root of a binary tree with n nodes, find its level order traversal.
Level order traversal of a tree is breadth-first traversal for the tree.

Example :

Input:
   1
 /   \ 
3     2
Output:
1 3 2

Give the problem a try before going through the video. All the best!!!
Problem Link: https://www.geeksforgeeks.org/problems/level-order-traversal/1