Examveda

What is the main difference between a binary heap and a binary search tree?

A. A binary heap does not maintain a sorted order while a binary search tree does.

B. A binary heap maintains a sorted order while a binary search tree does not.

C. Binary heaps are always balanced while binary search trees are not.

D. Binary heaps have only one child per node, binary search trees have two.

Answer: Option A


This Question Belongs to Data Structure >> Heaps

Join The Discussion

Related Questions on Heaps

Which of the following is true for a min-heap?

A. The root node is the smallest element, and every parent node is smaller than its children.

B. The root node is the largest element, and every parent node is larger than its children.

C. All nodes are arranged in a complete binary tree.

D. The tree is always balanced.