Pergunta de entrevista da empresa Microsoft

I was asked the k-sorted arrays problem