Python 99% speed 100% memory *Simple Solution* with comments
```\n#generate queue and append root to queue\n        #while there are nodes in the queue, \n            #iterate through the number of nodes in the queue \n  
```\n#generate queue and append root to queue\n        #while there are nodes in the queue, \n            #iterate through the number of nodes in the queue \n                #(this is the number of nodes in the next level)\n            #pop queue(0), add queue(0).val to current ans list and append                       queue(0)\'s children to queue\n            #append ans to final_list and reset ans = []\n        \n        if root is None:\n            return root\n        queue = []\n        return_list = []\n        queue.append(root)\n        while len(queue) > 0:\n            ans = []\n            l = len(queue)\n            for l in range(l):\n                node = queue.pop(0)\n                ans.append(node.val)\n                if node.left != None:\n                    queue.append(node.left)\n                if node.right != None:\n                    queue.append(node.right)\n            return_list.append(ans)\n        return return_list
['Python', 'Python3']