Bloomberg wants to invite N candidates to in-person interviews from different locations and Bloomberg will be paying for the flight tickets. Bloomberg has to split the candidates equally across 2 locations, NY and SFO.
You've been given a 2-D array of size N (N=number of candidates) and each candidate has 2 costs associated with him/her: cost of flight tickets to NY and second one is for SFO.
[
[CostToNY1, CostToSF1],
[CostToNY2, CostToSF2],
...
[CostToNYN, CostToSFN]
]
where N = even number.
Find total minimum cost to fly candidates for Bloomberg given the constraints.
e.g. [[1,5], [8,2]]
For 2 candidates above, candidate0 can go to NY and candidate1 can go to SFO.