Difference between binary tree and binary search tree

后端 未结 12 1649
情深已故
情深已故 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:55

    A tree can be called as a binary tree if and only if the maximum number of children of any of the nodes is two.

    A tree can be called as a binary search tree if and only if the maximum number of children of any of the nodes is two and the left child is always smaller than the right child.

提交回复
热议问题