Outreach Interview Question

some sorting question based on a array