1.

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 IThe question was asked in a job interview.

Answer»

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.



Discussion

No Comment Found

Related InterviewSolutions