1.

Tim sort begins sorting the given array by using which of the following sorting algorithm?(a) selection sort(b) quick sort(c) insertion sort(d) merge sortI have been asked this question during a job interview.I'm obligated to ask this question of Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

The correct OPTION is (C) insertion sort

To EXPLAIN: Tim sort begins sorting any given ARRAY by using insertion sort for each run. The array is divided into smaller parts for this purpose, each part having a size EQUAL to value of run. Then these small parts called runs are merged in order to obtain sorted array.



Discussion

No Comment Found

Related InterviewSolutions