Qualcomm interview question

merge sort and quick sort and their code