How to sort an array using minimum number of writes?

Viewed 6288

My friend was asked a question in his interview:

The interviewer gave him an array of unsorted numbers and asked him to sort. The restriction is that the number of writes should be minimized while there is no limitation on the number of reads.

5 Answers
Related