[Python] Simple Solution Recursive + Iterative
\nclass Solution:\n    def levelOrder(self, root: TreeNode) -> List[List[int]]:\n        ## RC ##\n        ## APPROACH : BFS ##\n        \n\t\t## TIME COMPLEXIT
```\nclass Solution:\n    def levelOrder(self, root: TreeNode) -> List[List[int]]:\n        ## RC ##\n        ## APPROACH : BFS ##\n        \n\t\t## TIME COMPLEXITY : O(N) ##\n\t\t## SPACE COMPLEXITY : O(N) ##\n\n        if(not root):   return []\n        queue = collections.deque([root])\n        all_levels = []\n        while (queue): \n            size = len(queue)\n            curr_level = []\n            for _ in range(size):\n                curr = queue.popleft()\n                curr_level.append(curr.val)\n                if(curr.left):     queue.append(curr.left)\n                if(curr.right):    queue.append(curr.right)\n            all_levels.append(curr_level)\n        return all_levels\n    \n        ## RECURSIVE APPROACH ##\n        if not root:    return []\n        levels = collections.defaultdict(list)\n        def helper(node, level):\n            levels[level].append(node.val)\n            if node.left:   helper(node.left, level + 1)\n            if node.right:  helper(node.right, level + 1)\n        helper(root, 0)\n        return levels.values()\n```\nPLEASE UPVOTE IF YOU LIKE MY SOLUTION
['Python', 'Python3']