Skip to content

Binary search trees · ⁨二叉搜索树⁩

English

Binary search trees

  • A binary search tree (BST) stores values so they stay sorted and are fast to find.
  • Each node holds a value and links to up to two children: a left and a right.
  • The top node is the root. A node with no children is a leaf.
中文

二叉搜索树

  • 二叉搜索树(binary search tree, BST)存储数据时让它们保持有序,并且查找很快。
  • 每个节点(node)保存一个值,并链接到最多两个子节点:一个 left(左)和一个 right(右)。
  • 最顶端的节点是根(root)。没有子节点的节点是叶子(leaf)。

Handout

Log in or create account · ⁨登录或创建账户⁩

IGCSE, A-Level · ⁨IGCSE、A-Level⁩ & AP · ⁨与 AP⁩