Skip to content

Latest commit

 

History

History

challenge-66

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Level Order Traversal of Binary Tree

This problem was asked by Microsoft.

Description

Given the root of a binary tree, return an array with its level-order traversal.

Example

Input:
    1
   / \
  2   3
     / \
    4   5

Output: [1, 2, 3, 4, 5]