1.

What is the usual size of a run in tim sort?(a) 32(b) less than 32(c) 32-64 depending on size of the array(d) 64I got this question in an online quiz.This question is from Sorting topic in portion Sorting of Data Structures & Algorithms II

Answer»

Right OPTION is (c) 32-64 DEPENDING on size of the array

Best explanation: Usually the size of the run is chosen somewhere between 32 and 64. The size of run is preferably chosen in powers of 2 in order to MAINTAIN balance while merging the sorted runs.



Discussion

No Comment Found

Related InterviewSolutions