Skip to content

Commit a8bfe51

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 4849db3 commit a8bfe51

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

greedy_methods/rearranging_fruits.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from typing import List
1111
from collections import defaultdict
1212

13+
1314
def min_cost(basket1: List[int], basket2: List[int]) -> int:
1415
n = len(basket1)
1516
freq = defaultdict(int)
@@ -37,11 +38,11 @@ def min_cost(basket1: List[int], basket2: List[int]) -> int:
3738
if __name__ == "__main__":
3839
# ---- Test Cases ----
3940
test_cases = [
40-
([4, 2, 2, 2], [1, 4, 1, 2]), # Expected: 1
41-
([1, 2, 3, 4], [2, 3, 4, 1]), # Expected: 0
42-
([1, 1, 1, 1], [1, 1, 1, 1]), # Expected: 0
43-
([1, 2, 2], [2, 1, 1]), # Expected: -1
44-
([5, 3, 3, 2], [2, 5, 5, 3]) # Expected: -1
41+
([4, 2, 2, 2], [1, 4, 1, 2]), # Expected: 1
42+
([1, 2, 3, 4], [2, 3, 4, 1]), # Expected: 0
43+
([1, 1, 1, 1], [1, 1, 1, 1]), # Expected: 0
44+
([1, 2, 2], [2, 1, 1]), # Expected: -1
45+
([5, 3, 3, 2], [2, 5, 5, 3]), # Expected: -1
4546
]
4647

4748
print("Running test cases...\n")

0 commit comments

Comments
 (0)