Skip to content

Latest commit

 

History

History
10 lines (9 loc) · 145 Bytes

File metadata and controls

10 lines (9 loc) · 145 Bytes

Idea

just BFS right, when level goes up:

result.append([])

for the nodes in the same level:

result[-1].append(node.val)