Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 274 Bytes

README.md

File metadata and controls

20 lines (14 loc) · 274 Bytes

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]