* Create alternate_disjoint_set.py
This code implements a disjoint set using Lists
with added heuristics for efficiency
Union by Rank Heuristic and Path Compression
* Update alternate_disjoint_set.py
Added typehints, doctests and some suggested variable name change
* Update alternate_disjoint_set.py
* Formatted with Black
* More formatting
* Formatting on line 28
* Error in Doctest
* Doctest Update in alternate disjoint set
* Fixed build error
* Fixed doctest
* Delete sleep_sort.py
A silly algorithm designed to waste time. #2350 demonstrates that it is a 20+ second denial of service attack on every Travis CI run that we do.
* fixup! Format Python code with psf/black push
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* Adding job scarping algorithm to web programming
* Delete fetch_jobs.py
* Adding Jobs Scraping to web programming
* Add Python type hints
Co-authored-by: Christian Clauss <cclauss@me.com>
* fixes: #2172
* fixes: #2172
* Added docstrings and type of parameters
* fixed error
* Added type hints
* made changes
* removed capital letters from function name
* Added type hints
* fixed bulid error
* modified comments
* fixed build error
* adding static type checking to basic_binary_tree.py
* Add static type checking to functions with None return type
* Applying code review comments
* Added missing import statement
* fix spaciing
* "cleaned up depth_of_tree"
* Add doctests and then streamline display() and is_full_binary_tree()
* added static typing to lazy_segment_tree.py
* added missing import statement
* modified variable names for left and right elements
* added static typing to lowest_common_ancestor.py
* fixed formatting
* modified files to meet style guidelines, edited docstrings and added some doctests
* added and fixed doctests in lazy_segment_tree.py
* fixed errors in doctests
Co-authored-by: Christian Clauss <cclauss@me.com>
* created dijkstra's two stack algorithm
* Made changes to dijkstras two stack algorithm for documentation and
testing purposes.
* Made changes to dijkstras two stack algorithm for documentation and
testing purposes.
* Fixed Grammar Mistake
* Added Explanation Reference
* Imported stack instead of using my own
Changed a few minor things.
* Imported stack instead of using my own
Changed a few minor things.
* Update data_structures/stacks/dijkstras_two_stack_algorithm.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Update dijkstras_two_stack_algorithm.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* * support negative number
* add different version
* fixup! Format Python code with psf/black push
* sum(int(c) for c in str(abs(n)))
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
* Create Transformations2D.py
* Update Transformations2D.py
* Drop numpy and add type hints and doctests
* Rename Transformations2D.py to transformations_2d.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* adding static type checking to basic_binary_tree.py
* Add static type checking to functions with None return type
* Applying code review comments
* Added missing import statement
* fix spaciing
* "cleaned up depth_of_tree"
* Add doctests and then streamline display() and is_full_binary_tree()
Co-authored-by: Christian Clauss <cclauss@me.com>
* PIL.Image.point() takes an int, not a float
@furkanatesli Trying to remove these warnings from our Travis CI build logs...
https://travis-ci.com/github/TheAlgorithms/Python/builds/178602503#L809
* fixup! Format Python code with psf/black push
* Revert changes to change_brightness.py
* updating DIRECTORY.md
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
* More efficient least common multiple.
* lowest -> least
* integer division
* Update least_common_multiple.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Josephus problem in Python
Added the code for the josephus problem in python using circular linked lists.
* Update josephus_problem.py
* Added World covid19 stats in web programming
* Delete josephus_problem.py
* Type hints, algorithmic functions should not print
Return a dict of world covid19 stats. Move all printing into the main functions.
* Update world_covid19_stats.py
* Update world_covid19_stats.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* Fix doubly linked list algorithm
* Fix bug with insert_at_tail method
Create __str__() method for Node class and LinkedList class
* Simplify __str__() of LinkedList
Returns empty string if there are no elements in the list
* Fix description
* added type hints and doctests to arithmetic_analysis/newton_method.py
Continuing #2128
Also changed some variable names, made them more descriptive.
* Added type hints and doctests to arithmetic_analysis/newton_method.py
added a type alias for Callable[[float], float] and cleaned up the exception handling
* added type hints and doctests to arithmetic_analysis/newton_method.py
improved exception handling
* Update newton_method.py
Co-authored-by: Christian Clauss <cclauss@me.com>