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).
Examples
Example 1:
Input: root = [3,9,20,null,null,15,7]
Output: [[3],[9,20],[15,7]]Example 2:
Input: root = [1]
Output: [[1]]Example 3:
Input: root = []
Output: []Constraints
The number of nodes in the tree is in the range
[0, 2000].-1000 <= Node.val <= 1000
How to participate
Drop your solution as a comment (or link a gist) by May 21, 2026 at noon Pacific Time.
Include:
Your programming language
Brief explanation of your approach
Stated complexity
What I’ll do
By May 23, I’ll publish a Review & Lessons post with:
Annotated feedback on selected submissions
A clean reference solution
Notes on how an interviewer would evaluate your approach.
If you’re short on time this week, at least sketch your approach in prose—that’s still valuable practice.
Upcoming Wednesday paid post will be a detailed analysis of BFS vs. DFS on trees: Queue-based BFS, recursive DFS variants, iterative DFS with stack, time/space analysis per approach.
If you’re a paid subscriber, you also get get exclusive weekly posts and the option to request a private resume/LinkedIn review.
Not paid yet? You can upgrade here:
© The Coding Interview Gym | paulepps.substack.com



