Infosys interview question

Quick sort and merge sort explanation