AlgoMaster Logo

Populating Next Right Pointers in Each Node II

tree=[1, 2, 3, 4, 5, null, 7]
0 / 22
123457L0L1L2queueconnect each level, any tree shape
algomaster.io
Step:Start: connect nodes level by level with BFS