Suppose the given array of size n is sorted other than first 10 element and last 50 elements. Find the sorting algorithm which can run faster than other algorithms.
Show the worked solutionInsertion Sort works faster, because only few elements need to ben inserted in proper places. Merge sort runs longer time compared to quicksort and quicksort runs longer than insertion sort. In this case, bubble sort is slower than insertion sort. So, Insertion sort is faster.Click to Join Our Telegram Group for Latest Update of MOCK TEST Click Here to Practice ALL Previous MOCK TEST FREE
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com