C3 AI Interview Question

One LC med-hard question related to sorting