Level order traversal wrapping Nodes with a shift index

The problem with recursive solution is how to keep the order within one shift, since there seems to be no option of level order traversal in doing recursion. I mean case [1,2,3,null,5,6,7,8,null,null,11] will result in one array having [11, 3] with simple recursive implementation. For that I had to try iterative and wrap each node with a shift index. Can any one solve this problem more concisely?

I think the time complexity of the problem is O(N) time & O(N) space. Please point out if I am wrong.