---
# System prepended metadata

title: Binary Tree Level Order Traversal
tags: [Tree, Easy]

---

# Binary Tree Level Order Traversal

###### tags: `Easy`、`Tree`
![](https://i.imgur.com/CvWY8qe.png)



```python=
# Definition for a binary tree node.
# class TreeNode(object):
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right
class Solution:
    def sortedArrayToBST(self, nums):
        
        if not nums: 
            return None
        mid = int(len(nums) / 2)
        return TreeNode(val=nums[mid], left=self.sortedArrayToBST(nums[:mid]), right=self.sortedArrayToBST(nums[(mid+1):]))
```