My solution is accepted, but I'm not very sure the solution use constant extra space, anyone help?

```
public class Solution {
public void connect(TreeLinkNode root) {
if (root == null) return;
ArrayList<TreeLinkNode> l = new ArrayList<TreeLinkNode>();
l.add(root);
while(!l.isEmpty()) {
ArrayList<TreeLinkNode> l2 = new ArrayList<TreeLinkNode>();
for(int i=0; i< l.size(); i++) {
TreeLinkNode node = l.get(i);
if (i != l.size()-1) node.next = l.get(i+1);
else node.next = null;
if (node.left != null) l2.add(node.left);
if (node.right != null) l2.add(node.right);
}
l = l2;
}
}
```

}