The Wayback Machine - https://web.archive.org/web/20200514234331/https://github.com/TheAlgorithms/Python/commits/master
Skip to content
Permalink
Branch: master
Commits on May 14, 2020
  1. improved prime number generator to check only up to sqrt(n) instead o…

    steven7214 and cclauss committed May 14, 2020
    …f n (#1984)
    
    * improved prime number generator to check only up to sqrt(n) instead of n
    
    * added old version as slow_primes() and named new, faster version primes()
    
    * fixed docstring in slow_primes
    
    * Add a timeit benchmark
    
    * Update prime_numbers.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  2. Update linear_search.py (#1974)

    Himanshu-77 committed May 14, 2020
    * Update linear_search.py
    
    Comment modified in line 17 as Sorting not required in Linear Search
    
    * Update linear_search.py
    
    Comment modified in line 17
Commits on May 13, 2020
  1. The new version of flake8 is linting f-strings (#1976)

    cclauss and github-actions committed May 13, 2020
    * The new version of flake8 is linting f-strings
    
    * updating DIRECTORY.md
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Commits on May 11, 2020
  1. Iterative merge sort implementation (#1972)

    amangupta0709 and cclauss committed May 11, 2020
    * Added Iterative merge sort
    
    * Added iterative merge sorts
    
    * Update changes
    
    * Add the ability to sort strings
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  2. Add type hints to max_heap.py (#1960)

    halilylm and cclauss committed May 11, 2020
    * Max heap implementation
    
    * Update max_heap.py
    
    * Update max_heap.py
    
    * Update max_heap.py
    
    * __len__ method added
    
    * Update max_heap.py
    
    Co-authored-by: halilpython <65048618+halilpython@users.noreply.github.com>
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on May 10, 2020
  1. Fix astar (#1966)

    cclauss and github-actions committed May 10, 2020
    * Fix astar
    
    Single character variable names are old school.
    
    * fixup! Format Python code with psf/black push
    
    * Tuple
    
    * updating DIRECTORY.md
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Travis CI: Strict flake8 (#1962)

    cclauss and github-actions committed May 10, 2020
    * Travis CI: Strict flake8
    
    Turn the screws all the way down.
    
    * updating DIRECTORY.md
    
    * Switch from flake8 --select to --ignore
    
    * Quotes
    
    * IGNORE=E123,E203,E265,E266,E302,E401,E402,E712,E731,E741,E743,F811,F841,W291,W293,W503
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Commits on May 9, 2020
  1. Added A* algorithm (#1913)

    jeffin07 committed May 9, 2020
    * a* algorithm
    
    * changes after build error
    
    * intent changes
    
    * fix after review
    
    * ImportMissmatchError
    
    * Build failed fix
    
    * doctest changes
    
    * doctest changes
  2. Kadanes_algorithm (#1959)

    Raj-Parekh24 and cclauss committed May 9, 2020
    * Add files via upload
    
    * Update Kadane's_algorithm.py
    
    * Update and rename Kadane's_algorithm.py to kadanes_algorithm.py
    
    * Update kadanes_algorithm.py
    
    * Update kadanes_algorithm.py
    
    * Update kadanes_algorithm.py
    
    * Update kadanes_algorithm.py
    
    * Update kadanes_algorithm.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  3. Travis CI: lint for useless backslashes (#1961)

    cclauss and github-actions committed May 9, 2020
    * Travis CI: lint for useless backslashes
    
    * updating DIRECTORY.md
    
    * flake8  --max-complexity=25
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Commits on May 8, 2020
  1. Upgrades to caesar_cipher.py (#1958)

    mrmaxguns and cclauss committed May 8, 2020
    * Added more flexibility to functions, decreased amount of repeating code
    
    * Added docstrings
    
    * Updated input functions
    
    * Added doctests
    
    * removed test piece of code
    
    * black .
    
    * Updated caesar cipher standard alphabet to fit python 3.8
    
    * Update and rename sleepsort.py to sleep_sort.py
    
    * Or 4
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on May 7, 2020
  1. Added Nearest neighbour algorithm (#1934)

    mateuszz0000 committed May 7, 2020
  2. Add graphs/frequent_pattern_graph_miner.py (#1866)

    siva1098 and cclauss committed May 7, 2020
    * Add files via upload
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update graphs/frequent_pattern_graph_miner.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Update frequent_pattern_graph_miner.py
    
    * Whitespace changes
    
    * Format with psf/black
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  3. Add sleep-sort (#1867)

    3 people committed May 7, 2020
    * added sleepsort
    
    Adding sleepsort
    
    * Add doctest and typing for sleepsort
    
    * Use self-descriptive variable name
    
    * Update sleepsort.py
    
    * Update sorts/sleepsort.py
    
    Co-authored-by: John Law <johnlaw.po@gmail.com>
    Co-authored-by: Christian Clauss <cclauss@me.com>
  4. Added Shortest Job First Algorithm (#1957)

    pharshil1902 and cclauss committed May 7, 2020
    * Added Shortest Job First Algorithm
    
    It is in IPYNB format but the dataframes are really looking good.
    Please, take a look.
    
    * Delete Shortest_Job_First_Algorithm.ipynb
    
    * Added Shortest Job First Algorithm
    
    * Update Shortest_Job_First Algorithm.py
    
    * Update Shortest_Job_First Algorithm.py
    
    * Update Shortest_Job_first Algorithm
    
    * Added Shortest_Job_First Algorithm
    
    * Added Shortest Job First Algorithm
    
    * Update shortest_job_first_algorithm.py
    
    * Format code with psf/black
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  5. Added Lstm example for stock predection (#1908)

    jeffin07 and cclauss committed May 7, 2020
    * Added Lstm example for stock predection
    
    * Changes after review
    
    * changes after build failed
    
    * Add Kiera’s to requirements.txt
    
    * requirements.txt: Add keras and tensorflow
    
    * psf/black
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on May 6, 2020
  1. Added new algorithm: cracking caesar cipher with the chi-squared test (

    mrmaxguns and cclauss committed May 6, 2020
    …#1950)
    
    * added decrypt_caesar_with_chi_squared.py and ran all checks
    
    * Updated default parameters
    
    Removed mistake with mutable default arguments
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Updated handling for optional arguments
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Changed return statement to tuple
    
    Made function return a tuple instead of a list
    
    * Added more doctests
    
    * Fixed spelling mistakes
    
    * black . - reformatted decrypt_caesar_with_chi_squared.py
    
    * Updated if statements to fit the updated code
    
    * Minimized amount of lines in the code.
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  2. change method name from front to get_front (#1943)

    vipulrai91 and “Vipul committed May 6, 2020
    Co-authored-by: “Vipul <“vipulrai8891@gmail.com”>
  3. Deal with maps (#1945)

    cclauss and github-actions committed May 6, 2020
    * Deal with maps
    
    Try with the search term "pizza" to see why this was done in #1932
    
    * fixup! Format Python code with psf/black push
    
    * Update armstrong_numbers.py
    
    * updating DIRECTORY.md
    
    * Update crawl_google_results.py
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Commits on May 5, 2020
  1. Create sol2.py (#1876)

    4 people committed May 5, 2020
    * Create sol2.py
    
    * updating DIRECTORY.md
    
    * Update DIRECTORY.md
    
    * updating DIRECTORY.md
    
    * Update sol2.py
    
    * Update DIRECTORY.md
    
    * updating DIRECTORY.md
    
    * Improve docstrings
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
    Co-authored-by: vinayak <itssvinayak@gmail.com>
    Co-authored-by: John Law <johnlaw@linux.com>
Commits on May 4, 2020
  1. Delete FUNDING.yml

    AnupKumarPanwar committed May 4, 2020
Commits on May 3, 2020
  1. Fix psf/black issues than fail the build (#1935)

    cclauss and github-actions committed May 3, 2020
    * Fix psf/black issues than fail the build
    
    * fixup! Format Python code with psf/black push
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Solution for Euler Problem 26 (#1939)

    shuklalok and cclauss committed May 3, 2020
    * Solution for Euler Problem 26
    
    * Update project_euler/problem_26/sol1.py
    
    typo error fix.
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_26/sol1.py
    
    typo error fix
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_26/sol1.py
    
    ok to remove, this comes from Pycharm automatically when docstring is added.
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_26/sol1.py
    
    ok to remove.
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_26/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_26/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * Update project_euler/problem_26/sol1.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * now_divide = now_divide * 10 % divide_by_number
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  3. added method for checking armstrong number (#1936)

    Akashpycs and cclauss committed May 3, 2020
    * added method for checking armstrong number
    
    * Update comment
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  4. Check if a item exist in stack or not (#1931)

    Akashpycs committed May 3, 2020
    * Check if a item exist in stack or not
    
    * implemented __contains__ method in stack
    
    * made changes in __contains__
Commits on May 2, 2020
  1. enhanced segment tree implementation and more pythonic (#1715)

    lanzhiwang committed May 2, 2020
    * enhanced segment tree implementation and more pythonic
    
    enhanced segment tree implementation and more pythonic
    
    * add doctests for segment tree
    
    * add type annotations
    
    * unified processing sum min max segment tre
    
    * delete source encoding in segment tree
    
    * use a generator function instead of returning
    
    * add doctests for methods
    
    * add doctests for methods
    
    * add doctests
    
    * fix doctest
    
    * fix doctest
    
    * fix doctest
    
    * fix function parameter and fix determine conditions
  2. support_vector_machines.py increase error tolerance to suppress conve…

    QuantumNovice and cclauss committed May 2, 2020
    …rgence warnings (#1929)
    
    * Update support_vector_machines.py
    
    * Update support_vector_machines.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  3. Hamiltonian Cycle (#1930)

    CSenshi and cclauss committed May 2, 2020
    * add skeleton code
    
    * add doctests
    
    * add tests for util function + implement wrapper
    
    * full implementation
    
    * add ability to add starting verex for algorithm
    
    * add static type checking
    
    * add doc tests to validation method
    
    * bug fix: doctests expected failing
    
    * Update hamiltonian_cycle.py
    
    * Update hamiltonian_cycle.py
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  4. Update stale comment (#1924)

    3 people committed May 2, 2020
    * Update close comment
    
    * Update stale.yml
    
    * Multiline strings in yaml files
    
    https://yaml-multiline.info/
    
    Co-authored-by: John Law <johnlaw.po@gmail.com>
    Co-authored-by: Christian Clauss <cclauss@me.com>
Commits on May 1, 2020
  1. Wrap lines that go beyond GitHub Editor (#1925)

    cclauss and github-actions committed May 1, 2020
    * Wrap lines that go beyond GiHub Editor
    
    * flake8 --count --select=E501 --max-line-length=127
    
    * updating DIRECTORY.md
    
    * Update strassen_matrix_multiplication.py
    
    * fixup! Format Python code with psf/black push
    
    * Update decision_tree.py
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  2. Changed the deprecated `np.matrix` to `np.ndarray` (#1923)

    QuantumNovice committed May 1, 2020
  3. Add shortest path by BFS (#1870)

    4 people committed May 1, 2020
    * Create breadth_first_search_shortest_path.py
    
    * updating DIRECTORY.md
    
    * Reduce side effect of `shortest_path`
    
    For the sake of future testing and documentation -
    
    * fixup! Format Python code with psf/black push
    
    * Fix typo `separately`
    
    * Change to get() from dictionary
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Move graph to the top
    
    * fixup! Format Python code with psf/black push
    
    * Add doctest for shortest path
    
    * Add doctest for BFS
    
    * fixup! Format Python code with psf/black push
    
    * Add typings for breadth_first_search_shortest_path
    
    * fixup! Format Python code with psf/black push
    
    * Remove assert from doctests
    
    * Add blank line to doctest
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
    Co-authored-by: John Law <johnlaw.po@gmail.com>
    Co-authored-by: Christian Clauss <cclauss@me.com>
    Co-authored-by: John Law <johnlaw@linux.com>
Commits on Apr 30, 2020
  1. Graph coloring (#1921)

    CSenshi and cclauss committed Apr 30, 2020
    * add skeleton code
    
    * add doctests
    
    * add mainc function pseudo code and tests (ToDo: write Implementation)
    
    * typo fixes
    
    * implement algorithm
    
    * add type checking
    
    * add wikipedia link
    
    * typo fix
    
    * update range syntax
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * change indexed iteration checking to any()
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
    
    * fix: swap import and documentation sections
    
    * fix: change return none to return empty list
    
    * remove unnecessary import (Union)
    
    * change: remove returning boolean indicating problem was solved or not
    
    * remove unnecessary import (Tuple)
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
  2. Fix invalid escape sequence in binary_search_tree.py (#1920)

    cclauss and github-actions committed Apr 30, 2020
    * Fix invalid escape sequence in binary_search_tree.py
    
    data_structures/binary_tree/binary_search_tree.py:156
      /home/travis/build/TheAlgorithms/Python/data_structures/binary_tree/binary_search_tree.py:156: DeprecationWarning: invalid escape sequence \
    
    * fixup! Format Python code with psf/black push
    
    Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
  3. Added Burkes dithering algorithm. (#1916)

    mateuszz0000 and cclauss committed Apr 30, 2020
    * Added Burkes dithering algorithm
    
    * Added unit tests for burkes algorithm
    
    * Fix burkes algorithm
    
    * Added some additional information
    
    * Fixed CI tests
    
    * Update digital_image_processing/dithering/burkes.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update digital_image_processing/dithering/burkes.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Update digital_image_processing/dithering/burkes.py
    
    Co-Authored-By: Christian Clauss <cclauss@me.com>
    
    * Propogate the += and add a doctest
    
    * Fix doctest
    
    * @staticmethod --> @ classmethod to ease testing
    
    * def test_burkes(file_path):
    
    * Fix for mypy checks
    
    * Fix variable order in get_greyscale
    
    * Fix get_greyscale method
    
    * Fix get_greyscale method
    
    * 3.753
    
    Co-authored-by: Christian Clauss <cclauss@me.com>
Older
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.