mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-27 23:11:09 +00:00
528b129019
* Update maximum_subarray.py 1. Rectify documentation to indicate the correct output: function doesn't return the subarray, but rather returns a sum. 2. Make the function more Pythonic and optimal. 3. Make function annotation generic i.e. can accept any sequence. 4. Raise value error when the input sequence is empty. * Update maximum_subarray.py 1. Use the conventions as mentioned in pep-0257. 2. Use negative infinity as the initial value for the current maximum and the answer. * Update maximum_subarray.py Avoid type conflict by returning the answer cast to an integer. * Update other/maximum_subarray.py Co-authored-by: Andrey <Cjkjvfnby@gmail.com> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update maximum_subarray.py * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update maximum_subarray.py Remove typecast to int for the final answer Co-authored-by: Andrey <Cjkjvfnby@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> |
||
---|---|---|
.. | ||
__init__.py | ||
activity_selection.py | ||
alternative_list_arrange.py | ||
check_strong_password.py | ||
davisb_putnamb_logemannb_loveland.py | ||
dijkstra_bankers_algorithm.py | ||
doomsday.py | ||
fischer_yates_shuffle.py | ||
gauss_easter.py | ||
graham_scan.py | ||
greedy.py | ||
least_recently_used.py | ||
lfu_cache.py | ||
linear_congruential_generator.py | ||
lru_cache.py | ||
magicdiamondpattern.py | ||
maximum_subarray.py | ||
nested_brackets.py | ||
password_generator.py | ||
scoring_algorithm.py | ||
sdes.py | ||
tower_of_hanoi.py |