Skip to content

Commit a018dc4

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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

searches/boyer_moore_majority_vote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@ def majority_element(nums: list[int]) -> int:
1818
for num in nums:
1919
if count == 0:
2020
candidate = num
21-
count += (1 if num == candidate else -1)
21+
count += 1 if num == candidate else -1
2222

2323
return candidate

0 commit comments

Comments
 (0)