|
10 | 10 | from typing import List |
11 | 11 | from collections import defaultdict |
12 | 12 |
|
| 13 | + |
13 | 14 | def min_cost(basket1: List[int], basket2: List[int]) -> int: |
14 | 15 | n = len(basket1) |
15 | 16 | freq = defaultdict(int) |
@@ -37,11 +38,11 @@ def min_cost(basket1: List[int], basket2: List[int]) -> int: |
37 | 38 | if __name__ == "__main__": |
38 | 39 | # ---- Test Cases ---- |
39 | 40 | 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 |
45 | 46 | ] |
46 | 47 |
|
47 | 48 | print("Running test cases...\n") |
|
0 commit comments