we can imagine such a tree, out task is to traversal it with DFS, and collect numbers along the way: 1, 10, 100, ... you get it. When we encounter a number larger than
n, we can return back to the previous level.
Hope it helps
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.