Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented moore voting algorithm #2847

Closed
wants to merge 2 commits into from

Conversation

SuprHUlk
Copy link

Description of Change

This pull request implements the Moore Voting Algorithm, addressing the issue #2830. Moore Voting Algorithm is used to find the majority element in an array (the element that appears more than ( \frac{n}{2} ) times). The algorithm works efficiently in O(n) time complexity and O(1) space complexity. The implementation includes:

  • The algorithm in C++
  • Self-contained tests verifying the correctness of the implementation
  • Documentation following Doxygen guidelines, explaining each function and its usage

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, tests must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Searched previous suggestions to confirm this implementation is not a duplicate
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
This implementation follows the proposed solution in the issue #2830. It includes detailed documentation to explain the algorithm’s logic, making it educational for developers and contributors.

Copy link
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Nov 18, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions bot closed this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant