Visma interview question

Q: Programming related. How would you solve this problem (array sorting)