Binary Tree Level Order
Medium๐ท๏ธ Trees๐ Trees & Heaps
๐งฉ The problem
Return the values of a binary tree level by level, as a list of lists. (Tests give the tree in level order with null for gaps.)
Examples
[3,9,20,null,null,15,7] โ [[3],[9,20],[15,7]]
๐ฏ Aim for: O(n) time
โ๏ธ Write your solution
Pick a language, press Run to try it, then Run tests to check it against every test case โ just like a coding interview.