Show the worked solution\[\boxed{\text{merge sort: } T(n)=2T(n/2)+\Theta(n)=\Theta(n\log n) \text{ for every input order}}\](A) Merge sort always halves and merges, so it is \(\Theta(n\log n)\) for every ordering. correct.(B) Insertion sort: \(\Theta(n)\) on sorted input, \(\Theta(n^{2})\) on reversed input.(C) Selection sort is also insensitive to the order (always \(n(n-1)/2\) comparisons), but it is \(\Theta(n^{2})\).(D) Quick sort: \(\Theta(n\log n)\) on average but \(\Theta(n^{2})\) in the worst case.Answer: A
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com