Microsoft interview question

Leetcode hard question k sort array I believe