Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Moore's Voting Algorithm - Boyer-Moore Majority Voting Algorithm#1750

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
mrinalchauhan wants to merge5 commits intoTheAlgorithms:master
base:master
Choose a base branch
Loading
frommrinalchauhan:master

Conversation

mrinalchauhan
Copy link

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.

@codecov-commenter
Copy link

codecov-commenter commentedOct 23, 2024
edited
Loading

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.79%. Comparing base(55ff0ad) to head(1951f32).

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.
📢 Have feedback on the report?Share it here.

Copy link
Collaborator

@appgurueuappgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Please also get rid of the unrelated changes topackage[-lock].json. Otherwise this looks fine.

Copy link
Collaborator

@appgurueuappgurueu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm afraid there are still unrelated changes in this PR. Essentially all changes that aren't toMooreVotingAlgorithm.* should not be in this PR.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@appgurueuappgurueuappgurueu left review comments

@raklaptudirmraklaptudirmAwaiting requested review from raklaptudirmraklaptudirm is a code owner

At least 2 approving reviews are required to merge this pull request.

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@mrinalchauhan@codecov-commenter@appgurueu

[8]ページ先頭

©2009-2025 Movatter.jp