Amazon Interview Question

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