You are given the root of a binary tree. Visit it level by level, from top to bottom. On each level go from left to right. Return the values as a list of levels, with one list for each level.
The answer is a list of lists of numbers, one inner list per level.
How the judge passes the data
Examples
Example 1:
Input: root = [10,4,15,2,null,12,20]
Output: [[10],[4,15],[2,12,20]]
Explanation: Level 1 is [10]. Level 2 is [4,15]. Level 3 is [2,12,20].
Example 2:
Input: root = [1,null,2,null,3]
Output: [[1],[2],[3]]
Explanation: Every node has only a right child, so each level has one value.
Example 3:
Input: root = []
Output: []
Explanation: An empty tree has no levels.