8.9k views
0 votes
What is the difference between a heap (a minheap) and a binary search tree?

1 Answer

2 votes

Answer:

Some differences between Heap and Binary search trees are as following:-

A heap is a complete binary tree.While a Binary Search Tree may be a complete,prefect binary tree.

A minheap the root should be minimum than it's children So it efficient for finding minimum and maximum.While Binary search trees have different properties the root node should be greater than the left child and should be less than the right child.

User Julius Depulla
by
5.5k points