# Which of the following is an advantage of balanced binary search tree, like AVL tree, compared to binary heap?

Category: QuestionsWhich of the following is an advantage of balanced binary search tree, like AVL tree, compared to binary heap?
Editor">Editor Staff asked 5 months ago

Which of the following is an advantage of balanced binary search tree, like AVL tree, compared to binary heap?

(a) insertion takes less time

(b) deletion takes less time

(c) searching takes less time

(d) construction of the tree takes less time than binary heap

Question is from Binary Trees topic in portion Binary Trees of Data Structures & Algorithms I

The question was asked by my school teacher while I was bunking the class.

Editor">Editor Staff answered 5 months ago

The correct choice is (a) insertion takes less time

Best explanation: Insertion and deletion, in both the binary heap and balanced binary search tree takes O(log n). But searching in balanced binary search tree requires O(log n) while binary heap takes O(n). Construction of balanced binary search tree takes O(nlog n) time while binary heap takes O(n).

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17

Notice: Trying to get property 'ID' of non-object in /home/fvckxqmi/public_html/wp-content/themes/blocksy/inc/single/single-helpers.php on line 17
Articles: 40701