102. Binary Tree Level Order Traversal

Practice Binary Tree Level Order Traversal for free on NudgeCode: Medium, Binary Tree pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.

Return the values of a binary tree grouped by depth: one list per level, top level first, and within each level from left to right.

Example

root = [3,9,20,null,null,15,7]  ->  [[3],[9,20],[15,7]]

Constraints