Python algorithms
Project description
SEANLAB Algorithms Pythonic Data Structures and Algorithms
Minimal and clean example implementations of data structures and algorithms in Python 3.
Contributing
Thanks for your interest in contributing! There are many ways to contribute to this project. Get started here
Tests
Use unittest
For running all tests write down:
$ python3 -m unittest discover tests
For running some specific tests you can do this as following (Ex: sort):
$ python3 -m unittest tests.test_sort
Use pytest
For running all tests write down:
$ python3 -m pytest tests
Install
If you want to use the API algorithms in your code, it is as simple as:
$ pip3 install seanalgorithms
You can test by creating a python file: (Ex: use merge_sort
in sort
)
from seanalgorithms.sort import merge_sort
if __name__ == "__main__":
my_list = [1, 8, 3, 5, 6]
my_list = merge_sort(my_list)
print(my_list)
Uninstall
If you want to uninstall seanalgorithms, it is as simple as:
$ pip3 uninstall -y seanalgorithms
List of Implementations
-
- check_bipartite
- strongly_connected
- clone_graph
- cycle_detection
- find_all_cliques
- find_path
- graph
- dijkstra
- markov_chain
- minimum_spanning_tree
- satisfiability
- minimum_spanning_tree_prims
- tarjan
- traversal
- maximum_flow
- maximum_flow_bfs
- maximum_flow_dfs
- all_pairs_shortest_path
- bellman_ford
- Count Connected Components
-
- power
- base_conversion
- combination
- cosine_similarity
- decimal_to_binary_ip
- euler_totient
- extended_gcd
- factorial
- gcd/lcm
- generate_strobogrammtic
- is_strobogrammatic
- modular_exponential
- next_bigger
- next_perfect_square
- nth_digit
- prime_check
- primes_sieve_of_eratosthenes
- pythagoras
- rabin_miller
- rsa
- sqrt_precision_factor
- summing_digits
- hailstone
- recursive_binomial_coefficient
- find_order
- find_primitive_root
- diffie_hellman_key_exchange
-
- fizzbuzz
- delete_reoccurring
- strip_url_params
- validate_coordinates
- domain_extractor
- merge_string_checker
- add_binary
- breaking_bad
- decode_string
- encode_decode
- group_anagrams
- int_to_roman
- is_palindrome
- license_number
- make_sentence
- multiply_strings
- one_edit_distance
- rabin_karp
- reverse_string
- reverse_vowel
- reverse_words
- roman_to_int
- word_squares
- unique_morse
- judge_circle
- strong_password
- caesar_cipher
- check_pangram
- contain_string
- count_binary_substring
- repeat_string
- min_distance
- longest_common_prefix
- rotate
- first_unique_char
- repeat_substring
- longest_palindromic_substring
- knuth_morris_pratt
Contributors
seanlab1, seanlab3 email: newstein33@gmail.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file seanalgorithms-0.8.tar.gz
.
File metadata
- Download URL: seanalgorithms-0.8.tar.gz
- Upload date:
- Size: 119.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f88b9ed1f51e90a6302156985bf66557d91e1ca7365f78c8e21198efba0279f5 |
|
MD5 | 15b0736d587f27001c9780ed61a1ece1 |
|
BLAKE2b-256 | c79e0003e5baafbfadb49f568ab80bb5eeb79d8245d8c6fb3f7aa18545181fcc |
File details
Details for the file seanalgorithms-0.8-py3-none-any.whl
.
File metadata
- Download URL: seanalgorithms-0.8-py3-none-any.whl
- Upload date:
- Size: 192.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.7.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c27a57baf1e0a51970df059a82ea9ce72207838a51c69e9fbd63b07af4f51a1d |
|
MD5 | 81f74e01628b0bbbdff66c31cdf57c0d |
|
BLAKE2b-256 | 153fb0183dacd6b4b85be457953f886fb3e1100b6effc4a60a2d80d5ffa72072 |