Virtusa interview question

How the sorting is done in collections