Partition array into N subsets with balanced sum - Company-specific OAs / Microsoft OA

https://algo.monster/problems/partition_array_into_n_subsets_with_balanced_sum

This solution doesn’t work for following input testcase:
1 2 3 4 5 6 7 8 9
3