What is Binary Search Tree (BST)?

I’m just going to give you a brief description of what a binary search tree is, but I won’t go into more detail.

Features of binary search tree:

  1. If its left subtree is not empty, then all the nodes in the left subtree are less than the value of its root node
  2. If its right subtree is not empty, then the value of all nodes in the right subtree is greater than the value of its root node
  3. Other left and right subtrees are binary search trees, respectively
  4. Binary search tree is a dynamic search table, in the process of search can be seen to add and delete the corresponding elements, in these operations need to maintain the properties of the binary search tree

The diagram below shows a binary search tree

<img src=”https://noxussj.top:3000/34/1.png”></img>

additional

  • This article is published through multiple platforms of “We Media” and will not be maintained after publication. If you have any objection to the content, you can discuss it in the GitHub below
  • The ongoing maintenance / 500 + face questions before update/notes 】 https://github.com/noxussj/In…
  • [3D city modeling using three. JS (Zhuhai City)] https://3d.noxussj.top/