All Algorithms implemented in Python the-algorithms.com/
Go to file
Ramy 976e385c1d
Implemented Suffix Tree Data Structure (#11554)
* Implemented KD-Tree Data Structure

* Implemented KD-Tree Data Structure. updated DIRECTORY.md.

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

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

* Create __init__.py

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

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

* Replaced legacy `np.random.rand` call with `np.random.Generator` in kd_tree/example_usage.py

* Replaced legacy `np.random.rand` call with `np.random.Generator` in kd_tree/hypercube_points.py

* added typehints and docstrings

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

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

* docstring for search()

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

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

* Added tests. Updated docstrings/typehints

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

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

* updated tests and used | for type annotations

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

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

* E501 for build_kdtree.py, hypercube_points.py, nearest_neighbour_search.py

* I001 for example_usage.py and test_kdtree.py

* I001 for example_usage.py and test_kdtree.py

* Update data_structures/kd_tree/build_kdtree.py

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

* Update data_structures/kd_tree/example/hypercube_points.py

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

* Update data_structures/kd_tree/example/hypercube_points.py

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

* Added new test cases requested in Review. Refactored the test_build_kdtree() to include various checks.

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

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

* Considered ruff errors

* Considered ruff errors

* Apply suggestions from code review

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

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

* Update kd_node.py

* imported annotations from __future__

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

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

* Implementation of the suffix tree data structure

* Adding data to DIRECTORY.md

* Minor file renaming

* minor correction

* renaming in DIRECTORY.md

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

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

* Considering ruff part-1

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

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

* Considering ruff part-2

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

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

* Considering ruff part-3

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

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

* Considering ruff part-4

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

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

* Considering ruff part-5

* Implemented Suffix Tree Data Structure.
Added some comments to my files in #11532, #11554.

* updating DIRECTORY.md

* Implemented Suffix Tree Data Structure.
Added some comments to my files in #11532, #11554.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Ramy-Badr-Ahmed <Ramy-Badr-Ahmed@users.noreply.github.com>
2024-09-28 15:37:00 +02:00
.devcontainer Upgrade our Devcontainer to Python 3.12 on Debian bookworm (#9580) 2023-10-03 23:04:59 +13:00
.github adding a proper fractions algorithm (#11224) 2024-03-20 14:33:40 +01:00
.vscode Create a Simultaneous Equation Solver Algorithm (#8773) 2023-06-02 07:14:25 +02:00
audio_filters Fix some ARG002 per file ignores (#11382) 2024-05-01 21:27:59 +02:00
backtracking [pre-commit.ci] pre-commit autoupdate (#11473) 2024-07-02 07:02:29 +02:00
bit_manipulation use format to remove '0b' (#11307) 2024-06-01 18:41:40 -07:00
blockchain Ruff pandas vet (#10281) 2023-10-11 14:30:02 -04:00
boolean_algebra [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
cellular_automata Enable ruff PLR5501 rule (#11332) 2024-03-28 18:25:41 +01:00
ciphers Enable ruff ICN001 rule (#11329) 2024-03-28 18:03:23 +00:00
compression Enable ruff RUF002 rule (#11377) 2024-04-22 21:51:47 +02:00
computer_vision chore: fix typos (#11467) 2024-06-17 06:27:07 -07:00
conversions Tests/add new test case weight_conversion (#11468) 2024-06-25 23:06:57 -07:00
data_structures Implemented Suffix Tree Data Structure (#11554) 2024-09-28 15:37:00 +02:00
digital_image_processing Enable ruff RUF002 rule (#11377) 2024-04-22 21:51:47 +02:00
divide_and_conquer Fix ruff (#11527) 2024-08-25 17:33:11 +02:00
docs/source [pre-commit.ci] pre-commit autoupdate (#11473) 2024-07-02 07:02:29 +02:00
dynamic_programming Enable ruff RUF003 rule (#11376) 2024-04-22 21:56:14 +02:00
electronics Enable ruff RUF002 rule (#11377) 2024-04-22 21:51:47 +02:00
file_transfer Update receive_file.py (#8541) 2023-03-31 16:08:13 +02:00
financial [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
fractals Enable ruff PGH003 rule (#11345) 2024-04-02 21:29:34 +02:00
fuzzy_logic balance parenthesis (add closing bracket) (#11563) 2024-09-24 00:30:36 -07:00
genetic_algorithm Add doctests in all functions in basic_string.py (#11374) 2024-04-20 12:50:37 +02:00
geodesy pre-commit: Upgrade psf/black for stable style 2023 (#8110) 2023-02-01 18:44:54 +05:30
geometry Enable ruff INP001 rule (#11346) 2024-04-02 21:13:56 +02:00
graphics Enable ruff PGH003 rule (#11345) 2024-04-02 21:29:34 +02:00
graphs Fix ruff (#11527) 2024-08-25 17:33:11 +02:00
greedy_methods Enable ruff INP001 rule (#11346) 2024-04-02 21:13:56 +02:00
hashes [pre-commit.ci] pre-commit autoupdate (#11473) 2024-07-02 07:02:29 +02:00
knapsack [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
linear_algebra Remove separate directory for gaussian_elimination_pivoting.py (#11445) 2024-08-22 18:42:40 +02:00
linear_programming Enable ruff INP001 rule (#11346) 2024-04-02 21:13:56 +02:00
machine_learning Fix grammar and spelling mistakes in sequential_minimum_optimization.py (#11427) 2024-06-13 17:47:29 -04:00
maths Fix ruff (#11527) 2024-08-25 17:33:11 +02:00
matrix Fix ruff (#11527) 2024-08-25 17:33:11 +02:00
networking_flow [pre-commit.ci] pre-commit autoupdate (#11322) 2024-03-13 07:52:41 +01:00
neural_network chore: fix typos (#11467) 2024-06-17 06:27:07 -07:00
other Enable ruff RUF002 rule (#11377) 2024-04-22 21:51:47 +02:00
physics Add rainfall intensity calculation function (#11432) 2024-06-11 02:45:00 -07:00
project_euler Fix ruff (#11527) 2024-08-25 17:33:11 +02:00
quantum Upgrade to Python 3.12 (#9576) 2023-10-03 14:47:10 +05:30
scheduling Fix ruff (#11527) 2024-08-25 17:33:11 +02:00
scripts Enable ruff S113 rule (#11375) 2024-04-21 19:34:18 +02:00
searches Add doctests to interpolation_search.py (#11492) 2024-07-25 17:56:31 +02:00
sorts [pre-commit.ci] pre-commit autoupdate (#11473) 2024-07-02 07:02:29 +02:00
source [pre-commit.ci] pre-commit autoupdate (#11473) 2024-07-02 07:02:29 +02:00
strings Create count_vowels.py (#11474) 2024-07-04 20:16:24 +02:00
web_programming [pre-commit.ci] pre-commit autoupdate (#11495) 2024-07-23 10:40:10 +02: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 (#11579) 2024-09-23 21:45:14 +02:00
CONTRIBUTING.md Fix Typo & Grammatical Errors (#10980) 2023-10-26 14:51:28 +02:00
DIRECTORY.md Implemented Suffix Tree Data Structure (#11554) 2024-09-28 15:37:00 +02:00
LICENSE.md LICENSE: Year change (#5920) 2022-03-16 23:40:48 +08:00
pyproject.toml Remove some per file ignores (#11381) 2024-06-16 17:19:32 -04:00
README.md chore: use newest Discord invite link (#8696) 2023-07-30 18:15:30 -07:00
requirements.txt Reenable files when TensorFlow supports the current Python (#11318) 2024-03-12 09:35:49 +01: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.