1.

What is the time taken to copy elements to and from two arrays created for deletion?(a) O(N)(b) O(N log N)(c) O(log N)(d) O(N^2)The question was posed to me in an international level competition.This intriguing question comes from Heapsort in section Sorting of Data Structures & Algorithms II

Answer»

Right choice is (a) O(N)

BEST explanation: The TIME taken to copy ELEMENTS to and from the MAIN array and extra array is found to be O(N).



Discussion

No Comment Found

Related InterviewSolutions