Commit Graph

4 Commits

Author SHA1 Message Date
Himanshu Tomar
331585f3f8
Algorithm: Calculating Product Sum from a Special Array with Nested Structures (#8761)
* Added minimum waiting time problem solution using greedy algorithm

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* ruff --fix

* Add type hints

* Added two more doc test

* Removed unnecessary comments

* updated type hints

* Updated the code as per the code review

* Added recursive algo to calculate product sum from an array

* Added recursive algo to calculate product sum from an array

* Update doc string

* Added doctest for product_sum function

* Updated the code and added more doctests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Added more test coverage for product_sum method

* Update product_sum.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-06-23 10:26:05 +02:00
Sundaram Kumar Jha
4a27b54430
Update permutations.py (#8102) 2023-05-31 12:56:59 +12:00
Alexander Pantyukhin
7f1a5521f4
add prefix sum (#7959)
* add prefix sum

* updating DIRECTORY.md

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-04 20:30:32 +13:00
Anshraj Shrivastava
efb4a3aee8
added algo for finding permutations of an array (#7614)
* Add files via upload

* Delete permutations.cpython-310.pyc

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update permutations.py

* Update permutations.py

* Add files via upload

* Delete permutations.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update permutations.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update permutations.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update permutations.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update data_structures/arrays/permutations.py

Co-authored-by: Christian Clauss <cclauss@me.com>

* Update permutations.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update permutations.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update data_structures/arrays/permutations.py

Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>

* Update permutations.py

* Update permutations.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update permutations.py

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
2022-10-29 15:29:15 +02:00