I recently got this question in an interview
You are supposed to host 2 parties minimize cost to host 2 parties. Cost is computed as travelling cost of guest to party A or B. Split guests to party A or Party B.
Example: [[0,1000,2000],[1,1000,3000]]
Ans: [[1],[0]]
Explaination : Total cost is cost of hosting A + cost of hosting B = 1000+2000 = 3000
Example: [[0,1000,2000],[1,2000,3000],[2,3000,5000],[3,3000,1000]]
Ans: [[1,2], [0,3]] = 2000+3000+2000+1000 = 8000