All Algorithms implemented in Python the-algorithms.com/
Go to file
Vaibhav Singh 96df906e7a
All suggeted changes within additional time limit tests (#1815)
* With all suggested changes  

possibly covered all the recommended guidelines

* Updated with both slow and faster algorithms

possibally covered all the recomendations

* removed the time comparision part!

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Update data_structures/stacks/next_greater_element.py

Co-Authored-By: Christian Clauss <cclauss@me.com>

* Add benchmark using timeit

https://docs.python.org/3/library/timeit.html

The performance delta between these two implementation is quite small...
```
next_greatest_element_slow(): 1.843442126
     next_greatest_element(): 1.828941414
```

* Optimize slow() to create fast() - Three algorithms in the race

Three algorithms in the race

* Use a bigger test array with floats, negatives, zero

* Setup import next_greatest_element_fast

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-03-27 08:16:07 +01:00
.github directory_writer: actions/checkout@v1 # Use v1, NOT v2 (#1799) 2020-03-14 07:33:14 +01:00
arithmetic_analysis Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
backtracking contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
blockchain Add Topological Sort (#1302) 2019-10-18 08:13:58 +02:00
boolean_algebra Tabs --> spaces in quine_mc_cluskey.py (#1426) 2019-11-21 22:21:40 +08:00
ciphers autoblack: actions/checkout@v1 # Use v1, NOT v2 (#1796) 2020-03-13 09:23:38 +01:00
compression Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
conversions Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
data_structures All suggeted changes within additional time limit tests (#1815) 2020-03-27 08:16:07 +01:00
digital_image_processing contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
divide_and_conquer contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
dynamic_programming contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
file_transfer Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
fuzzy_logic contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
geodesy Implemented geodesy - Lambert's ellipsoidal distance (#1763) 2020-02-20 14:34:43 +01:00
graphics Added implementation for Bezier Curve, under a new graphics directory. (#1713) 2020-01-25 07:18:43 +01:00
graphs contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
hashes contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
images Add Travis_CI_tests_are_failing.md (#1499) 2019-10-28 13:38:08 +01:00
linear_algebra uses: actions/checkout@v2 (#1779) 2020-02-21 15:32:35 +05:30
machine_learning Added Random Forest Classifier (#1738) 2020-03-13 09:13:43 +01:00
maths 'allocation_content_length' (#1808) 2020-03-20 15:24:05 +01:00
matrix Fixes unused variable errors in LGTM (#1746) 2020-02-11 13:59:09 +05:30
networking_flow Create codespell.yml (#1698) 2020-01-18 13:24:33 +01:00
neural_network Travis CI: Upgrade to Python 3.8 (#1783) 2020-02-23 04:23:00 +01:00
optimization added hill climbing algorithm (#1666) 2020-01-08 06:00:55 +01:00
other contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
project_euler contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
scheduling Fixes black failures (#1742) 2020-02-10 11:43:57 +01:00
scripts contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
searches contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
sorts autoblack: actions/checkout@v1 # Use v1, NOT v2 (#1796) 2020-03-13 09:23:38 +01:00
strings Fixes black failures from Previous PR (#1751) 2020-02-13 02:19:41 +05:30
traversals contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
web_programming contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
.coveragerc Add pytest-cov (#1578) 2019-11-17 19:37:58 +01:00
.gitignore contribution guidelines checks (#1787) 2020-03-04 13:40:28 +01:00
.gitpod.yml Add gitpod config (#1744) 2020-02-10 22:26:59 +01:00
.travis.yml Travis CI: Fix Travis linter errors (#1802) 2020-03-14 23:55:13 +01:00
CONTRIBUTING.md Mandates referencing issue in PR (#1717) 2020-01-27 21:54:57 +01:00
DIRECTORY.md Travis CI: Fix Travis linter errors (#1802) 2020-03-14 23:55:13 +01:00
LICENSE.md Create CONTRIBUTING.md (#864) 2019-06-02 12:14:18 +08:00
README.md Add gitpod config (#1744) 2020-02-10 22:26:59 +01:00
requirements.txt Travis CI: Upgrade to Python 3.8 (#1783) 2020-02-23 04:23:00 +01:00
Travis_CI_tests_are_failing.md Add Travis_CI_tests_are_failing.md (#1499) 2019-10-28 13:38:08 +01:00

The Algorithms - Python

Gitpod Ready-to-Code Gitter chat  Build Status  LGTM  contributions welcome  Donate   

All algorithms implemented in Python (for education)

These implementations are for learning purposes. They may be less efficient than the implementations in the Python standard library.

Contribution Guidelines

Read our Contribution Guidelines before you contribute.

Community Channel

We're on Gitter! Please join us.

List of Algorithms

See our directory.