We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
class Solution: def twoCitySchedCost(self, costs): FirstCity = [i for i,_ in costs] Diff = [j - i for i,j in costs] return sum(FirstCity) + sum(sorted(Diff)[:len(costs)//2])