with high probability (see exercise - in-place quick-sort recall from section that sorting algorithm is in-place if it uses only small amount of memory in addition to that needed for the objects being sorted themselves the merge-sort algorithmas we have described it aboveis not inplaceand making it be in-place requires more complicated merging method than the one we discuss in section in-place sorting is not inherently difficulthowever foras with heap-sortquick-sort can be adapted to be in-place performing the quick-sort algorithm in-place requires bit of ingenuityhoweverfor we must use the input sequence itself to store the subsequences for all the recursive calls we show algorithm inplacequicksortwhich performs inplace quick-sortin code fragment algorithm inplacequicksort assumes that the input sequencesis given as an array of distinct elements the reason for this restriction is explored in exercise - the extension to the general case is discussed in exercise - code fragment input array in-place quick-sort for an