Show the worked solutionAn in-place sort rearranges the elements inside the input array itself, using only a constant number of extra variables (indices, a temporary for swaps).\[\text{extra space}=O(1).\]Heapsort, insertion sort and selection sort meet this; merge sort needs \(O(n)\) and recursive quicksort \(O(\log n)\) stack space.Answer: C
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com