Skip to content

docs: merge BST topic into tree traversal guide#8

Merged
realDuang merged 1 commit intomainfrom
docs/merge-bst-into-tree-topic
Mar 2, 2026
Merged

docs: merge BST topic into tree traversal guide#8
realDuang merged 1 commit intomainfrom
docs/merge-bst-into-tree-topic

Conversation

@realDuang
Copy link
Copy Markdown
Owner

@realDuang realDuang commented Mar 2, 2026

This pull request makes significant improvements and refinements to the binary tree traversal and BST (Binary Search Tree) sections in the documentation. The updates focus on clarifying traversal frameworks, unifying terminology, enhancing code examples, and providing more structured problem references and solution patterns. The BST section is also consolidated into the traversal chapter for better coherence.

Key improvements include:

Documentation Structure & Thematic Refinement

  • The BST (Binary Search Tree) content is now integrated directly into the binary tree traversal topic, focusing on the application of in-order traversal for BST problems, and the standalone BST chapter (3.binary-search-tree.md) has been removed. This streamlines the learning path and reduces redundancy. [1] [2]

Traversal Frameworks & Code Examples

  • The binary tree traversal documentation now clearly distinguishes between pre-order, in-order, post-order (DFS), and BFS traversal frameworks, providing concise code templates and highlighting their application scenarios with "judgment keywords" and typical problem types. [1] [2] [3] [4] [5] [6]
  • BFS traversal is now introduced with its own section and code template, and the various BFS problem variants are summarized in a table for easier reference. [1] [2]

Problem Mapping & Solution Patterns

  • For each traversal or construction method, tables are added to map typical LeetCode problems to the corresponding framework, and to highlight the specific tweaks needed for each problem. This makes it easier for readers to transfer patterns across problems. [1] [2] [3] [4] [5]
  • The "专题目录" in README.md is updated to clarify the scope and focus of each topic, especially regarding BST and traversal.

Terminology & Clarity

  • Terminology is unified and clarified throughout, such as consistently using "序列化签名" for subtree comparison and "按区间建根" for construction problems. Code comments and explanations are also improved for clarity and accuracy. [1] [2]

References:
[1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

@realDuang realDuang merged commit 9c072e2 into main Mar 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant