# Tree

### Binary Tree Operation

* [226. Invert Binary Tree](https://leetcode.com/problems/invert-binary-tree/)
* [100. Same Tree](https://leetcode.com/problems/same-tree/)
* [617. Merge Two Binary Trees](https://leetcode.com/problems/merge-two-binary-trees/)
* [111. Minimum Depth of Binary Tree](https://leetcode.com/problems/minimum-depth-of-binary-tree/)
* [104. Maximum Depth of Binary Tree](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
* [637. Average of Levels in Binary Tree](https://leetcode.com/problems/average-of-levels-in-binary-tree/)
* [110. Balanced Binary Tree](https://leetcode.com/problems/balanced-binary-tree/)
* [543. Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/)
* [112. Path Sum](https://leetcode.com/problems/path-sum/)
* [236. Lowest Common Ancestor of a Binary Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)
* [199. Binary Tree Right Side View](https://leetcode.com/problems/binary-tree-right-side-view/)
* [230. Kth Smallest Element in a BST](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)
* [297. Serialize and Deserialize Binary Tree](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/)
* [105. Construct Binary Tree from Preorder and Inorder Traversal](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/): also add a set

### Binary Search Tree Related

* [235. Lowest Common Ancestor of a Binary Search Tree](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)

* [98. Validate Binary Search Tree](https://leetcode.com/problems/validate-binary-search-tree/)

* No. 102 Binary Tree Level Order Traversal： BFS, DFS(record height)

### Divide and Conquer

* [543. Diameter of Binary Tree](https://leetcode.com/problems/diameter-of-binary-tree/)
* No. 687: devide and conquer

### Tree to String

* [572. Subtree of Another Tree](https://leetcode.com/problems/subtree-of-another-tree/)&#x20;
  * ```python
    return f",{node.val},{serialize(node.left)},{serialize(node.right)}"
    ```

### Trie

* [208. Implement Trie (Prefix Tree)](https://leetcode.com/problems/implement-trie-prefix-tree/)
