Hexagon interview question

Coding Sort a stream of data with acceptable time complexity