Vayyar interview question

I was asked a technical question about sorting a list.