BNY interview question

Sorting two arrays