Given the root of a binary tree, return the level order traversal of its nodes' values (left to right, level by level), as an array of arrays.
Input: root = [3,9,20,null,null,15,7]
Output: [[3],[9,20],[15,7]]
Topics: trees
Asked by: Amazon, Meta, Microsoft, LinkedIn
Time complexity: O(n). Space complexity: O(n).