What is the key difference between a Binary Search Tree (BST) and a binary…
2024
What is the key difference between a Binary Search Tree (BST) and a binary tree ?
- A.
BST has fixed height, while binary tree can have any height.
- B.
BST allows duplicate values, while binary tree does not.
- C.
BST has ordered elements, while binary tree can have any arrangement.
- D.
All of the above.
Attempted by 89 students.
Show answer & explanation
Correct answer: C
A binary tree is any tree in which each node has at most two children, and there is no required ordering among the node values. A Binary Search Tree is a special binary tree that follows a search-order property: values in the left subtree are smaller than the node value and values in the right subtree are larger, according to the chosen duplicate-handling convention. Therefore, the key difference is that a BST has ordered elements, while a general binary tree can have any arrangement.