All Algorithms implemented in Python the-algorithms.com/
Go to file
Saptadeep Banerjee 4707fdb0f2
Add tests for Perfect_Number (#10745)
* Added new tests!

* [ADD]: Inproved Tests

* fixed

* Removed spaces

* Changed the file name

* Added Changes

* changed the code and kept the test cases

* changed the code and kept the test cases

* missed the line

* removed spaces

* Update power_using_recursion.py

* Added new tests in Signum

* Few things added

* Removed few stuff and added few changes

* Fixed few things

* Reverted the function

* Update maths/signum.py

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

* Added few things

* Update maths/signum.py

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

* Added the type hint back

* Update signum.py

* Added NEW tests for Perfect_Number

* Update maths/special_numbers/perfect_number.py

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

* Added the line back

* Update maths/special_numbers/perfect_number.py

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

* Fixed a space

* Updated

* Reverted changes

* Added the old code and FIXED few LINES

* Fixed few things

* Changed Test CASES

* Update perfect_number.py

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

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

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-22 00:05:37 +02:00
.devcontainer Upgrade our Devcontainer to Python 3.12 on Debian bookworm (#9580) 2023-10-03 23:04:59 +13:00
.github docs: add test scenarios to pull request template (#10396) 2023-10-19 16:35:41 +02:00
.vscode Create a Simultaneous Equation Solver Algorithm (#8773) 2023-06-02 07:14:25 +02:00
arithmetic_analysis Refactoring and optimization of the lu_decomposition algorithm (#9231) 2023-10-16 03:29:46 -04:00
audio_filters Add more ruff rules (#8767) 2023-05-26 09:34:17 +02:00
backtracking Test cases for all_combinations (#10633) 2023-10-17 16:57:33 +02:00
bit_manipulation Create swap_all_odd_and_even_bits.py (#10692) 2023-10-19 19:49:47 +02:00
blockchain Ruff pandas vet (#10281) 2023-10-11 14:30:02 -04:00
boolean_algebra Optimize and_gate and nand_gate (#10591) 2023-10-17 01:17:49 +02:00
cellular_automata Fix typos (#9076) 2023-09-23 10:53:09 +02:00
ciphers Add docstrings and doctests and fix a bug ciphers/trifid_cipher.py (#10716) 2023-10-20 23:28:21 +02:00
compression Fix typos (#9076) 2023-09-23 10:53:09 +02:00
computer_vision [pre-commit.ci] pre-commit autoupdate (#9543) 2023-10-07 21:32:28 +02:00
conversions Hacktoberfest: Added Octal Number to Hexadecimal Number Conversion Algorithm (#10533) 2023-10-17 03:10:24 -04:00
data_structures Simplify is_bst.py (#10627) 2023-10-19 13:31:51 -04:00
digital_image_processing Ruff pandas vet (#10281) 2023-10-11 14:30:02 -04:00
divide_and_conquer Mention square matrices in strassen docs and make it more clear (#9839) 2023-10-07 05:35:23 -04:00
dynamic_programming Delete dynamic_programming/longest_sub_array.py (#10073) 2023-10-16 04:03:16 -04:00
electronics charging_inductor (#10427) 2023-10-15 22:41:39 +02:00
file_transfer Update receive_file.py (#8541) 2023-03-31 16:08:13 +02:00
financial Adds exponential moving average algorithm (#10273) 2023-10-12 15:54:07 +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 Concatenates both check bipatrite graphs(bfs&dfs) (#10708) 2023-10-20 08:09:58 +02:00
greedy_methods Move and rename maths/greedy_coin_change.py (#10418) 2023-10-16 01:42:55 +02:00
hashes Ruff pandas vet (#10281) 2023-10-11 14:30:02 -04:00
knapsack Ruff pandas vet (#10281) 2023-10-11 14:30:02 -04:00
linear_algebra Ruff pandas vet (#10281) 2023-10-11 14:30:02 -04:00
linear_programming Fix simplex.py (#8843) 2023-08-17 14:34:53 -07:00
machine_learning Add: FP Growth Algorithm (#10746) 2023-10-21 16:51:29 +02:00
maths Add tests for Perfect_Number (#10745) 2023-10-22 00:05:37 +02:00
matrix Add matrix_multiplication (#10045) 2023-10-17 11:25:25 +02:00
networking_flow clean of unnecessary checks, imports, calls (#7993) 2022-11-21 00:00:27 +13:00
neural_network Added A General Swish Activation Function inNeural Networks (#10415) 2023-10-18 10:50:18 -04:00
other Fix typo in DPLL file name (#10723) 2023-10-20 09:08:23 +02:00
physics updated physics/archimedes_principle.py (#10479) 2023-10-15 19:13:40 +02:00
project_euler Performance: 75% faster Project Euler 187 (#10503) 2023-10-15 11:17:22 +02:00
quantum Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30
scheduling [Add] : Job Sequence program under GREEDY methods (#10482) 2023-10-15 12:18:28 +02:00
scripts Revert "validate_solutions.py: os.getenv('GITHUB_TOKEN', '')" (#10552) 2023-10-15 15:40:13 -04:00
searches add exponential search algorithm (#10732) 2023-10-21 20:53:34 +02:00
sorts Consolidate bubble sort iterative and recursive (#10651) 2023-10-19 22:45:51 +02:00
strings Edit Distance Algorithm for String Matching (#10571) 2023-10-19 08:38:02 -04: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.ci] pre-commit autoupdate (#10613) 2023-10-16 20:23:33 +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 Consolidate binary exponentiation files (#10742) 2023-10-21 13:27:36 -04:00
LICENSE.md LICENSE: Year change (#5920) 2022-03-16 23:40:48 +08:00
pyproject.toml Add docstrings and doctests and fix a bug ciphers/trifid_cipher.py (#10716) 2023-10-20 23:28:21 +02:00
README.md chore: use newest Discord invite link (#8696) 2023-07-30 18:15:30 -07:00
requirements.txt Delete texttable from dependencies (#10565) 2023-10-16 02:01:01 +02:00

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.