Tree level width
Directions
Given the root node of a tree, return an array where each element is the width of the tree at each level.
Use
Node file.
Examples:
Given: 0 / | \ 1 2 3 | | 4 5 Answer: [1, 3, 2]
Solutions
Solution #1