Bloomberg Interview Question

Sorting complexity.