algorithms icon indicating copy to clipboard operation
algorithms copied to clipboard

Minimal examples of data structures and algorithms in Python

Results 157 algorithms issues
Sort by recently updated
recently updated
newest added

test case file test_array.py is missing a comma at line 12

Adds requested Gale-Shapley algorithm with test case requested in issue #1963

The Gale-Shapley algorithm is missing. The algorithm is used for finding a solution to the stable matching problem.

### Description: This pull request adds the `gray_code(n)` function and corresponding unit tests to generate and verify n-bit Gray code sequences. Gray code is a numeral system used in digital...

Implemented a dynamic programming algorithm to find to amount of unique paths we can take from the top left square to the bottom right square inside a grid.

Implemented a visualization algorithm for binary trees Issue link:https://github.com/keon/algorithms/issues/829 ![image](https://github.com/user-attachments/assets/8a511cfd-384e-4432-a158-607d2fba6419)

### PR Description: This PR introduces the implementation of **Manacher's Algorithm**, an efficient algorithm to find the longest palindromic substring in linear time **O(n)**. Additionally, the PR includes a set...

### PR Description: This PR introduces the implementation of the `compute_z_array` function, which computes the Z-array for a given string in linear time, as well as comprehensive unit tests to...

Implement A* search algorithm for finding shortest paths in a weighted graph.