All Algorithms implemented in Python the-algorithms.com/
Go to file
Sarvjeet Singh 795e97e87f
Added Majority Voting Algorithm (#9866)
* Create MajorityVoteAlgorithm.py

* Update and rename MajorityVoteAlgorithm.py to majorityvotealgorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update and rename majorityvotealgorithm.py to majority_vote_algorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update majority_vote_algorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update majority_vote_algorithm.py

* Update majority_vote_algorithm.py

* Update other/majority_vote_algorithm.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* renaming variables majority_vote_algorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update majority_vote_algorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update majority_vote_algorithm.py

* Update majority_vote_algorithm.py

* Update majority_vote_algorithm.py

* Update majority_vote_algorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update other/majority_vote_algorithm.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update other/majority_vote_algorithm.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* adding more testcases majority_vote_algorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update majority_vote_algorithm.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update majority_vote_algorithm.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-06 15:49:34 +02:00
.devcontainer Upgrade our Devcontainer to Python 3.12 on Debian bookworm (#9580) 2023-10-03 23:04:59 +13:00
.github Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30
.vscode Create a Simultaneous Equation Solver Algorithm (#8773) 2023-06-02 07:14:25 +02:00
arithmetic_analysis Delete empty junk file (#9062) 2023-09-17 00:12:31 +02:00
audio_filters Add more ruff rules (#8767) 2023-05-26 09:34:17 +02:00
backtracking Match a pattern and String using backtracking (#9861) 2023-10-06 11:45:10 +13:00
bit_manipulation Added largest pow of 2 le num (#9374) 2023-10-05 21:37:23 +13:00
blockchain pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
boolean_algebra Rename norgate to nor_gate to keep consistency (#8968) 2023-08-16 18:21:00 -07:00
cellular_automata Fix typos (#9076) 2023-09-23 10:53:09 +02:00
ciphers Fixed file name in transposition_cipher_encrypt_decrypt_file.py. Fixing bug file not found. (#9426) 2023-10-03 23:34:55 -04:00
compression Fix typos (#9076) 2023-09-23 10:53:09 +02:00
computer_vision Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30
conversions Delete empty junk file (#9062) 2023-09-17 00:12:31 +02:00
data_structures Use dataclasses in singly_linked_list.py (#9886) 2023-10-06 15:31:11 +13:00
digital_image_processing added laplacian_filter file (#9783) 2023-10-06 01:43:45 +02:00
divide_and_conquer [pre-commit.ci] pre-commit autoupdate (#9013) 2023-08-29 15:18:10 +02:00
dynamic_programming largest divisible subset (#9825) 2023-10-05 18:21:28 +02:00
electronics Added Wheatstone Bridge Algorithm (#9872) 2023-10-06 01:16:51 +02:00
file_transfer Update receive_file.py (#8541) 2023-03-31 16:08:13 +02:00
financial Added apr_interest function to financial (#6025) 2023-06-19 13:46:29 +02:00
fractals Window closing fix (#8625) 2023-07-31 20:02:49 -07:00
fuzzy_logic Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30
genetic_algorithm Add more ruff rules (#8767) 2023-05-26 09:34:17 +02:00
geodesy pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
graphics Add more ruff rules (#8767) 2023-05-26 09:34:17 +02:00
graphs Added algorithm to deeply clone a graph (#9765) 2023-10-06 00:45:40 +02:00
greedy_methods add gas station (#9446) 2023-10-05 15:18:54 +02:00
hashes Fletcher 16 (#9775) 2023-10-05 08:12:08 +02:00
knapsack pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
linear_algebra Reduce the complexity of linear_algebra/src/polynom_for_points.py (#8605) 2023-08-13 03:05:42 -07:00
linear_programming Fix simplex.py (#8843) 2023-08-17 14:34:53 -07:00
machine_learning Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30
maths Updated prime_numbers.py testcases. (#9851) 2023-10-05 20:44:55 +02:00
matrix add median of matrix (#9363) 2023-10-04 19:21:46 +02:00
networking_flow clean of unnecessary checks, imports, calls (#7993) 2022-11-21 00:00:27 +13:00
neural_network Changing the directory of sigmoid_linear_unit.py (#9824) 2023-10-05 10:07:44 -04:00
other Added Majority Voting Algorithm (#9866) 2023-10-06 15:49:34 +02:00
physics Doctest Error Correction of mirror_formulae.py (#9782) 2023-10-05 09:48:15 +02:00
project_euler Euler072 - application of vector operations to reduce calculation time and refactoring numpy (#9229) 2023-10-01 14:14:58 -04:00
quantum Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30
scheduling [pre-commit.ci] pre-commit autoupdate (#9013) 2023-08-29 15:18:10 +02:00
scripts Add more ruff rules (#8767) 2023-05-26 09:34:17 +02:00
searches improvements to jump_search.py (#8932) 2023-08-08 14:47:09 -07:00
sorts Add typing (#9654) 2023-10-03 22:07:25 -04:00
strings camelCase to snake_case conversion - Fixes #9726 (#9727) 2023-10-06 11:05:23 +13:00
web_programming Fix mypy error in web_programming/reddit.py (#9162) 2023-10-01 16:10:33 +13:00
.gitattributes Create .gitattributes for Cross OS compatibility (#3410) 2020-10-17 07:25:25 +02:00
.gitignore chore: update .gitignore (#6263) 2022-07-23 07:56:59 +05:30
.gitpod.yml Change gitpod configuration for python3. (#1827) 2020-04-07 12:20:08 +02:00
.pre-commit-config.yaml pre-commit autoupdate && pre-commit run --all-files (#9516) 2023-10-03 05:05:43 +02:00
CONTRIBUTING.md Update contributing guidelines to say not to open new issues for algorithms (#9760) 2023-10-05 13:26:33 +02:00
DIRECTORY.md Use dataclasses in singly_linked_list.py (#9886) 2023-10-06 15:31:11 +13:00
LICENSE.md LICENSE: Year change (#5920) 2022-03-16 23:40:48 +08:00
pyproject.toml Fix ruff rules ISC flake8-implicit-str-concat (#8892) 2023-07-28 17:53:09 +01:00
README.md chore: use newest Discord invite link (#8696) 2023-07-30 18:15:30 -07:00
requirements.txt Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30

The Algorithms - Python

Gitpod Ready-to-Code Contributions Welcome Discord chat Gitter chat
GitHub Workflow Status pre-commit code style: black

All algorithms implemented in Python - for education

Implementations are for learning purposes only. They may be less efficient than the implementations in the Python standard library. Use them at your discretion.

Getting Started

Read through our Contribution Guidelines before you contribute.

Community Channels

We are on Discord and Gitter! Community channels are a great way for you to ask questions and get help. Please join us!

List of Algorithms

See our directory for easier navigation and a better overview of the project.