Skip to content

Commit ea5ee03

Browse files
authored
Update minimum-incompatibility.py
1 parent bc26b59 commit ea5ee03

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/minimum-incompatibility.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def greedy(nums, k, is_reversed):
131131
ordered_set.remove(x)
132132
freq_to_nodes.pop(len(stks)-curr)
133133
# greedily fill the contiguous ordered elements into the first vacant subset until it is full,
134-
# otherwise, the result sum would get larger
134+
# otherwise, the result sum would get larger => in fact, this is wrong
135135
to_remove = []
136136
direction = (lambda x:x) if not is_reversed else reversed
137137
for x in direction(ordered_set):
@@ -305,7 +305,7 @@ def greedy(nums, k, is_reversed):
305305
ordered_set.remove(ordered_set.find(x))
306306
freq_to_nodes.pop(len(stks)-curr)
307307
# greedily fill the contiguous ordered elements into the first vacant subset until it is full,
308-
# otherwise, the result sum would get larger
308+
# otherwise, the result sum would get larger => in fact, this is wrong
309309
it = ordered_set.begin()
310310
while it != ordered_set.end():
311311
x = it.val
@@ -359,7 +359,7 @@ def greedy(nums, k, is_reversed):
359359
remain -= count[x]
360360
count[x] = 0
361361
# greedily fill the contiguous ordered elements into the first vacant subset until it is full,
362-
# otherwise, the result sum would get larger
362+
# otherwise, the result sum would get larger => in fact, this is wrong
363363
for x in sorted_keys:
364364
if not count[x]:
365365
continue

0 commit comments

Comments
 (0)