Two Sigma interview question

Sorting some objects