1.

Which of the following algorithm is implemented internally in java when we use function arrays.sort()?(a) intro sort(b) quick sort(c) tim sort(d) merge sortThis question was posed to me in exam.I need to ask this question from Sorting topic in chapter Sorting of Data Structures & Algorithms II

Answer»

The CORRECT answer is (c) TIM sort

Explanation: JAVA makes use of Tim sort internally for implementing arrays.sort(). It is mainly DUE to the fastness of this algorithm in COMPARISON to other comparison based sorts.



Discussion

No Comment Found

Related InterviewSolutions