Infosys interview question

Sorting searching data structures oops