In what time can a leftist heap be built?

Category: QuestionsIn what time can a leftist heap be built?
Editor">Editor Staff asked 5 months ago

In what time can a leftist heap be built?
 
(a) O(N)
 
(b) O(N log N)
 
(c) O(log N)
 
(d) O(M log N)
 
The query is from Heap topic in portion Heap of Data Structures & Algorithms I
 
The question was asked in a job interview.

1 Answers
Editor">Editor Staff answered 5 months ago

Right choice is (a) O(N)
 
Best explanation: The mathematical calculation yields a result that, a leftist heap can be built in O(N) time by building a binary heap.


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: 40702