We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 58ba496 commit 9d55017Copy full SHA for 9d55017
Week_1_Day_03.py
@@ -0,0 +1,6 @@
1
+class Solution:
2
+ def twoCitySchedCost(self, costs: List[List[int]]) -> int:
3
+ fcity = [i for i,j in costs]
4
+ Diff = [j - i for i,j in costs]
5
+ return sum(fcity) + sum(sorted(Diff)[:len(costs)//2])
6
+
0 commit comments