* 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>
* 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>
* Stack using double linked list
* Test with doctests
* Update stack_using_dll.py
* Update stack_using_dll.py
* Update stack_using_dll.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update DIRECTORY
* Updated DIRECTORY
* Fixed bug in directory build and re-build the directory.md
* fixed url issue
* fixed indentation in Directory.md
* Add problem-18 of project-euler
* Delete sol1.py
* Delete files
* Added more details to question
* Added doctest in printNGE()
* Made changes to fix Travis CI build
* Remove the trailing whitespace
* Added doctest and more explanation about Dijkstra execution.
* tests were not passing with python2 due to missing __init__.py file at number_theory folder
* Removed the dot at the beginning of the imported modules names because 'python3 -m doctest -v data_structures/hashing/*.py' and 'python3 -m doctest -v data_structures/stacks/*.py' were failing not finding hash_table.py and stack.py modules.
* Moved global code to main scope and added doctest for project euler problems 1 to 14.
* Added test case for negative input.
* Changed N variable to do not use end of line scape because in case there is a space after it the script will break making it much more error prone.
* Added problems description and doctests to the ones that were missing. Limited line length to 79 and executed python black over all scripts.
* Changed the way files are loaded to support pytest call.
* Added __init__.py to problems to make them modules and allow pytest execution.
* Added project_euler folder to test units execution
* Changed 'os.path.split(os.path.realpath(__file__))' to 'os.path.dirname()'