> For the complete documentation index, see [llms.txt](https://blog.yushunchen.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree.md).

# 3. Binary Search Tree

- [Insert Node in a Binary Search Tree](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/insert-node-in-a-binary-search-tree.md): ID: 85; easy; 在二叉查找树中插入节点
- [Remove Node in Binary Search Tree](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/remove-node-in-binary-search-tree.md): ID: 87; hard; 删除二叉查找树的节点
- [Validate Binary Search Tree](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/validate-binary-search-tree.md): ID: 98; medium; 验证二叉查找树
- [Trim a Binary Search Tree](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/trim-a-binary-search-tree.md): ID: 701; medium; 修剪二叉搜索树
- [Search Range in Binary Search Tree](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/search-range-in-binary-search-tree.md): ID: 11; medium; 二叉查找树中搜索区间
- [Inorder Successor in BST](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/inorder-successor-in-bst.md): ID: 448; medium; 二叉查找树的中序后继
- [Binary Search Tree Iterator](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/binary-search-tree-iterator.md): ID: 86; hard; 二叉查找树迭代器
- [Recover Binary Search Tree](https://blog.yushunchen.com/algo/binary-tree/3.-binary-search-tree/recover-binary-search-tree.md): ID: 691; medium; 恢复二叉搜索树


---

# 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://blog.yushunchen.com/algo/binary-tree/3.-binary-search-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.
