> For the complete documentation index, see [llms.txt](https://mnunknown.gitbook.io/algorithm-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mnunknown.gitbook.io/algorithm-notes/binary_tree.md).

# Binary Tree，二叉树

- [各种 Binary Tree 定义](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/61_tree_-_ge_zhong_binary_tree_ding_yi.md)
- [LCA 类问题](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/lca_lei_wen_ti.md)
- [三序遍历，vertical order](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/529_tree.md)
- [Post order traversal 的应用](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/post_order_traversal_de_ying_yong.md)
- [Min/Max/Balanced Depth](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/530_tree.md)
- [BST](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/531_tree-_bst.md)
- [子树结构](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/61_tree.md)
- [Level Order traversal](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/62-_tree-_level_order_traversal.md)
- [Morris 遍历](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/63-_tree-_morris_bian_li.md)
- [修改结构](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/63-_tree.md)
- [创建 / 序列化](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/67-_tree-_chuang_jian__xu_lie_hua.md)
- [子树组合，BST query](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/68-_tree.md)
- [路径与路径和](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/lu_jing_yu_lu_jing_he.md)
- [NestedInteger 类](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/nestedinteger_lei.md)
- [(FB) 从 Binary Tree Path 看如何递归转迭代](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/fbgao_989129_ru_he_di_gui_zhuan_die_dai.md)
- [(FB) Binary Tree Path 比较路径大小](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/fb_binary_tree_path_bi_jiao_lu_jing_da_xiao.md)
- [比较好玩的 Binary Tree 概率题](https://mnunknown.gitbook.io/algorithm-notes/binary_tree/bi_jiao_hao_wan_de_binary_tree_gai_lv_ti.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mnunknown.gitbook.io/algorithm-notes/binary_tree.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
