Bloomberg Interview Question

Technical question K messed sort array