Moore's Voting Algorithm - Boyer-Moore Majority Voting Algorithm#1750
Open
mrinalchauhan wants to merge 5 commits intoTheAlgorithms:masterfrom
Open
Moore's Voting Algorithm - Boyer-Moore Majority Voting Algorithm#1750mrinalchauhan wants to merge 5 commits intoTheAlgorithms:masterfrom
mrinalchauhan wants to merge 5 commits intoTheAlgorithms:masterfrom
Conversation
added 2 commits
October 23, 2024 22:45
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1750 +/- ##
==========================================
+ Coverage 84.76% 84.79% +0.02%
==========================================
Files 378 379 +1
Lines 19738 19770 +32
Branches 2957 2962 +5
==========================================
+ Hits 16731 16763 +32
Misses 3007 3007 ☔ View full report in Codecov by Sentry. |
appgurueu
reviewed
Oct 24, 2024
Collaborator
appgurueu
left a comment
There was a problem hiding this comment.
Please also get rid of the unrelated changes to package[-lock].json. Otherwise this looks fine.
appgurueu
reviewed
Oct 28, 2024
Collaborator
appgurueu
left a comment
There was a problem hiding this comment.
I'm afraid there are still unrelated changes in this PR. Essentially all changes that aren't to MooreVotingAlgorithm.* should not be in this PR.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The Boyer-Moore voting algorithm is one of the popular optimal algorithms which is used to find the majority element among the given elements that have more than N/ 2 occurrences. This works perfectly fine for finding the majority element which takes 2 traversals over the given elements, which works in O(N) time complexity and O(1) space complexity.