Skip to content
Veltoryx Technologies
ProProblem 95● MediumLeetCode #102 ↗3 min readUpdated 30 October 2026

Binary Tree Level Order Traversal

Traverse a binary tree level by level using Breadth-First Search with an ArrayDeque.

01The problem

Given the root of a binary tree, return the level order traversal of its nodes' values (i.e., from left to right, level by level).

text
       3
      /      9   20
        /         15   7

Output: [[3], [9, 20], [15, 7]]

Constraints

  • The number of nodes in the tree is in the range [0, 2000].
  • -1000 <= Node.val <= 1000

Loading the rest of the lesson…