Springer Nature interview question

Any sorting technique.