Pregunta de entrevista de Amazon

To sort two arrays using only a while loop and 3 variables.