Two Sigma Interview Question

Sorting some objects