Snapwiz interview question

Sorting an array