Difference between binary tree and binary search tree

后端 未结 12 1656
情深已故
情深已故 2020-11-29 14:44

Can anyone please explain the difference between binary tree and binary search tree with an example?

12条回答
  •  情歌与酒
    2020-11-29 14:56

    A binary search tree is a special kind of binary tree which exhibits the following property: for any node n, every descendant node's value in the left subtree of n is less than the value of n, and every descendant node's value in the right subtree is greater than the value of n.

提交回复
热议问题