Fetching algorithms...
root = [3,9,20,null,null,15,7]
3
root = [1,null,2]
2
root = []
0
Time Complexity
Space Complexity
Initialize max to 0 and a queue with the root node at depth 1.