Populating Next Right Pointers in Each Node II

Connect each node to its next right node. Return the levels obtained by following next pointers from left to right.

Examples
Input: [1,2,3,4,5,null,7]
Output: [[1],[2,3],[4,5,7]]
Hints

Populating Next Right Pointers in Each Node II

Connect each node to its next right node. Return the levels obtained by following next pointers from left to right.