```
def levelOrder(self, root):
if not root: return []
queue, queue2, result, levelVals = [root], [], [], []
while queue:
node = queue.pop(0)
if node.left: queue2.append(node.left)
if node.right: queue2.append(node.right)
levelVals.append(node.val)
if not queue:
result.append(levelVals)
levelVals = []
queue, queue2 = queue2, queue
return result
```