Commit Graph

2834 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
Jan-Lukas Huhn
f54a966810
Energy conversions (#8801)
* Create TestShiva

* Delete TestShiva

* Create energy_conversions.py

* Update conversions/energy_conversions.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

---------

Co-authored-by: ShivaDahal99 <130563462+ShivaDahal99@users.noreply.github.com>
Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2023-06-22 14:31:48 +02:00
Tianyi Zheng
5ffe601c86
Fix mypy errors in maths/sigmoid_linear_unit.py (#8786)
* updating DIRECTORY.md

* Fix mypy errors in sigmoid_linear_unit.py

* updating DIRECTORY.md

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-06-22 14:24:34 +02:00
Linus M. Henkel
5b0890bd83
Dijkstra algorithm with binary grid (#8802)
* Create TestShiva

* Delete TestShiva

* Implementation of the Dijkstra-Algorithm in a binary grid

* Update double_ended_queue.py

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

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

* Update least_common_multiple.py

* Update sol1.py

* Update pyproject.toml

* Update pyproject.toml

* https://github.com/astral-sh/ruff-pre-commit v0.0.274

---------

Co-authored-by: ShivaDahal99 <130563462+ShivaDahal99@users.noreply.github.com>
Co-authored-by: jlhuhn <134317018+jlhuhn@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-22 13:49:09 +02:00
Christian Clauss
07e6812888
Update .pre-commit-config.yaml (#8828)
* Update .pre-commit-config.yaml

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-20 21:33:16 +05:30
pre-commit-ci[bot]
0dee4a402c
[pre-commit.ci] pre-commit autoupdate (#8827)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/codespell-project/codespell: v2.2.4 → v2.2.5](https://github.com/codespell-project/codespell/compare/v2.2.4...v2.2.5)
- [github.com/tox-dev/pyproject-fmt: 0.11.2 → 0.12.0](https://github.com/tox-dev/pyproject-fmt/compare/0.11.2...0.12.0)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-06-20 15:56:14 +02:00
Turro
ea6c6056cf
Added apr_interest function to financial (#6025)
* Added apr_interest function to financial

* Update interest.py

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

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

* Update financial/interest.py

* float

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-19 13:46:29 +02:00
Frank-1998
b0f871032e
Fix removing the root node in binary_search_tree.py removes the whole tree (#8752)
* fix issue #8715

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

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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-18 18:30:06 +02:00
Ilkin Mengusoglu
e6f89a6b89
Simplex algorithm (#8825)
* feat: added simplex.py

* added docstrings

* Update linear_programming/simplex.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

* Update linear_programming/simplex.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

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

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

* Update linear_programming/simplex.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

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

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

* ruff fix

Co-authored by: CaedenPH <caedenperelliharris@gmail.com>

* removed README to add in separate PR

* Update linear_programming/simplex.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* Update linear_programming/simplex.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

* fix class docstring

* add comments

---------

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-06-18 18:00:02 +02:00
pre-commit-ci[bot]
4637986125
[pre-commit.ci] pre-commit autoupdate (#8817)
updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.270 → v0.0.272](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.270...v0.0.272)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-13 00:09:33 +02:00
Caeden Perelli-Harris
daa0c8f3d3
Create count negative numbers in matrix algorithm (#8813)
* updating DIRECTORY.md

* feat: Count negative numbers in sorted matrix

* updating DIRECTORY.md

* chore: Fix pre-commit

* refactor: Combine functions into iteration

* style: Reformat reference

* feat: Add timings of each implementation

* chore: Fix problems with algorithms-keeper bot

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

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

* test: Remove doctest from benchmark function

* Update matrix/count_negative_numbers_in_sorted_matrix.py

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

* Update matrix/count_negative_numbers_in_sorted_matrix.py

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

* Update matrix/count_negative_numbers_in_sorted_matrix.py

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

* Update matrix/count_negative_numbers_in_sorted_matrix.py

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

* Update matrix/count_negative_numbers_in_sorted_matrix.py

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

* Update matrix/count_negative_numbers_in_sorted_matrix.py

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

* refactor: Use sum instead of large iteration

* refactor: Use len not sum

* Update count_negative_numbers_in_sorted_matrix.py

---------

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>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-06-10 14:21:49 +02:00
Jan Wojciechowski
9c9da8ebf1
Improve readability of ciphers/mixed_keyword_cypher.py (#8626)
* refactored the code

* the code will now pass the test

* looked more into it and fixed the logic

* made the code easier to read, added comments and fixed the logic

* got rid of redundant code + plaintext can contain chars that are not in the alphabet

* fixed the reduntant conversion of ascii_uppercase to a list

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

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

* keyword and plaintext won't have default values

* ran the ruff command

* Update linear_discriminant_analysis.py and rsa_cipher.py (#8680)

* Update rsa_cipher.py by replacing %s with {}

* Update rsa_cipher.py

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

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

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update linear_discriminant_analysis.py

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

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

* Update linear_discriminant_analysis.py

* Update machine_learning/linear_discriminant_analysis.py

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

* Update linear_discriminant_analysis.py

* updated

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>

* fixed some difficulties

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

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

* added comments, made printing mapping optional, added 1 test

* shortened the line that was too long

* Update ciphers/mixed_keyword_cypher.py

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Rohan Anand <96521078+rohan472000@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-06-09 11:06:37 +02:00
Caeden Perelli-Harris
7775de0ef7
Create number container system algorithm (#8808)
* feat: Create number container system algorithm

* updating DIRECTORY.md

* chore: Fix failing tests

* Update other/number_container_system.py

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

* Update other/number_container_system.py

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

* Update other/number_container_system.py

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

* chore: Add more tests

* chore: Create binary_search_insert failing test

* type: Update typehints to accept str, list and range

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-06-08 14:40:38 +02:00
ShivaDahal99
fa12b9a286
Speed of sound (#8803)
* Create TestShiva

* Delete TestShiva

* Add speed of sound

* Update physics/speed_of_sound.py

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

* Update physics/speed_of_sound.py

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

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

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

* Update speed_of_sound.py

* Update speed_of_sound.py

---------

Co-authored-by: jlhuhn <134317018+jlhuhn@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-06-07 23:47:27 +02:00
Caeden Perelli-Harris
80d95fccc3
Pytest locally fails due to API_KEY env variable (#8738)
* fix: Pytest locally fails due to API_KEY env variable (#8737)

* chore: Fix ruff errors
2023-06-03 18:16:33 +02:00
Chris O
3a9e5fa5ec
Create a Simultaneous Equation Solver Algorithm (#8773)
* Added simultaneous_linear_equation_solver.py

* Removed Augment class, replaced with recursive functions

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

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

* fixed edge cases

* Update settings.json

---------

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-02 07:14:25 +02:00
nith2001
4621b0bb4f
Improved Graph Implementations (#8730)
* Improved Graph Implementations

Provides new implementation for graph_list.py and graph_matrix.py along with pytest suites for each. Fixes #8709

* Graph implementation style fixes, corrections, and refactored tests

* Helpful docs about graph implementation

* Refactored code to separate files and applied enumerate()

* Renamed files and refactored code to fail fast

* Error handling style fix

* Fixed f-string code quality issue

* Last f-string fix

* Added return types to test functions and more style fixes

* Added more function return types

* Added more function return types pt2

* Fixed error messages
2023-05-31 22:06:12 +02:00
Rudransh Bhardwaj
e871540e37
Added rank of matrix in linear algebra (#8687)
* Added rank of matrix in linear algebra

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

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

* Corrected name of function

* Corrected Rank_of_Matrix.py

* Completed rank_of_matrix.py

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

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

* delete to rename Rank_of_Matrix.py

* created rank_of_matrix

* added more doctests in rank_of_matrix.py

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

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

* fixed some issues in rank_of_matrix.py

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

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

* added moreeee doctestsss in rank_of_mtrix.py and fixed some bugss

* Update linear_algebra/src/rank_of_matrix.py

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

* Update linear_algebra/src/rank_of_matrix.py

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

* Update linear_algebra/src/rank_of_matrix.py

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

* Update rank_of_matrix.py

* Update linear_algebra/src/rank_of_matrix.py

Co-authored-by: Caeden Perelli-Harris <caedenperelliharris@gmail.com>

---------

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: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
2023-05-31 17:03:02 +02:00
Sundaram Kumar Jha
4a27b54430
Update permutations.py (#8102) 2023-05-31 12:56:59 +12:00
Tianyi Zheng
c93659d7ce
Fix type error in strassen_matrix_multiplication.py (#8784)
* Fix type error in strassen_matrix_multiplication.py

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-30 12:37:54 +12:00
Christian Clauss
4b79d771cd
Add more ruff rules (#8767)
* Add more ruff rules

* Add more ruff rules

* pre-commit: Update ruff v0.0.269 -> v0.0.270

* Apply suggestions from code review

* Fix doctest

* Fix doctest (ignore whitespace)

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

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

---------

Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-26 09:34:17 +02:00
Christian Clauss
dd3b499bfa
Rename is_palindrome.py to is_int_palindrome.py (#8768)
* Rename is_palindrome.py to is_int_palindrome.py

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-26 12:20:33 +05:30
Juyoung Kim
a17791d022
fix: graphs/greedy_best_first typo (#8766)
#8764
2023-05-25 14:54:18 +02:00
Caeden Perelli-Harris
cfbbfd9896
Merge and add benchmarks to palindrome algorithms in the strings/ directory (#8749)
* refactor: Merge and add benchmarks to palindrome

* updating DIRECTORY.md

* chore: Fix failing tests

* Update strings/palindrome.py

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

* Update palindrome.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-05-25 12:56:23 +02:00
Ratnesh Kumar
a6631487b0
Fix CI badge in the README.md (#8137) 2023-05-25 12:34:11 +02:00
Chris O
200429fc47
Dual Number Automatic Differentiation (#8760)
* Added dual_number_automatic_differentiation.py

* updating DIRECTORY.md

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

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

* Update maths/dual_number_automatic_differentiation.py

---------

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>
2023-05-25 08:04:42 +02:00
Caeden Perelli-Harris
df88771905
Mark fetch anime and play as broken (#8763)
* updating DIRECTORY.md

* updating DIRECTORY.md

* fix: Correct ruff errors

* fix: Mark anime algorithm as broken

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-25 07:59:15 +02:00
pre-commit-ci[bot]
ce43a8ac4a
[pre-commit.ci] pre-commit autoupdate (#8759)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.267 → v0.0.269](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.267...v0.0.269)
- [github.com/abravalheri/validate-pyproject: v0.12.2 → v0.13](https://github.com/abravalheri/validate-pyproject/compare/v0.12.2...v0.13)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-23 05:54:30 +02:00
Daniel Luo
edc17b60e0
add __main__ around print (#8747) 2023-05-19 12:40:52 +12:00
Rohan Saraogi
cf5e34d479
Added is_palindrome.py (#8748) 2023-05-19 11:48:22 +12:00
Caeden Perelli-Harris
9b3e4028c6
Fixes broken "Create guess_the_number_search.py" (#8746) 2023-05-17 18:47:23 +12:00
Harkishan Khuva
a2783c6597
Create guess_the_number_search.py (#7937) 2023-05-17 12:22:24 +12:00
Alexander Pantyukhin
61cfb43d2b
Add h index (#8036) 2023-05-17 12:21:16 +12:00
Rohan Saraogi
3dc143f721
Added odd_sieve.py (#8740) 2023-05-17 12:08:56 +12:00
Tianyi Zheng
8102424950
local_weighted_learning.py: fix mypy errors and more (#8073) 2023-05-17 12:05:55 +12:00
Maxim Smolskiy
c0892a0651
Reduce the complexity of genetic_algorithm/basic_string.py (#8606) 2023-05-16 09:47:50 +12:00
pre-commit-ci[bot]
2a57dafce0
[pre-commit.ci] pre-commit autoupdate (#8716)
updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.263 → v0.0.267](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.263...v0.0.267)
- [github.com/tox-dev/pyproject-fmt: 0.11.1 → 0.11.2](https://github.com/tox-dev/pyproject-fmt/compare/0.11.1...0.11.2)
- [github.com/pre-commit/mirrors-mypy: v1.2.0 → v1.3.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.2.0...v1.3.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-15 22:27:59 +01:00
Caeden Perelli-Harris
1faf10b5c2
Correct ruff failures (#8732)
* fix: Correct ruff problems

* updating DIRECTORY.md

* fix: Fix pre-commit errors

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-14 22:03:13 +01:00
Pronoy Mandal
793e564e1d
Create maximum_subsequence.py (#7811) 2023-05-11 07:00:59 +12:00
Margaret
6939538a41
adding the remove digit algorithm (#6708) 2023-05-11 06:55:48 +12:00
Margaret
997d56fb63
Switch case (#7995) 2023-05-11 06:53:47 +12:00
shricubed
44aa17fb86
Working binary insertion sort in Python (#8024) 2023-05-11 06:50:32 +12:00
Rohan Anand
209a59ee56
Update and_gate.py (#8690)
* Update and_gate.py

addressing issue #8656 by calling `test_and_gate()` , ensuring that all the assertions are verified before the actual output is printed.

* Update and_gate.py

addressing issue #8632
2023-05-10 21:38:52 +12:00
Pronoy Mandal
91cc3a240f
Update game_of_life.py (#8703)
Rectify spelling in docstring
2023-05-10 21:34:36 +12:00
Dipankar Mitra
7310514509
The ELU activation is added (#8699)
* tanh function been added

* tanh function been added

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

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

* tanh function is added

* tanh function is added

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

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

* tanh function added

* tanh function added

* tanh function is added

* Apply suggestions from code review

* ELU activation function is added

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

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

* elu activation is added

* ELU activation is added

* Update maths/elu_activation.py

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

* Exponential_linear_unit activation is added

* Exponential_linear_unit activation is added

---------

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-05-02 16:36:28 +02:00
pre-commit-ci[bot]
777f966893
[pre-commit.ci] pre-commit autoupdate (#8704)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/charliermarsh/ruff-pre-commit: v0.0.262 → v0.0.263](https://github.com/charliermarsh/ruff-pre-commit/compare/v0.0.262...v0.0.263)
- [github.com/tox-dev/pyproject-fmt: 0.10.0 → 0.11.1](https://github.com/tox-dev/pyproject-fmt/compare/0.10.0...0.11.1)

* updating DIRECTORY.md

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-01 23:48:56 +02:00
Himanshu Tomar
e966c5cc0f
Added minimum waiting time problem solution using greedy algorithm (#8701)
* 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

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-05-01 12:23:03 +02:00
Christian Clauss
f6df26bf0f
Fix docstring in present_value.py (#8702)
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-05-01 06:29:42 +05:30
Sahil Goel
c4dcc44dd4
Added an algorithm to calculate the present value of cash flows (#8700)
* Added an algorithm to calculate the present value of cash flows

* added doctest and reference

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

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

* Resolving deprecation issues with typing module

* Fixing argument type checks and adding doctest case

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

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

* Fixing failing doctest case by requiring less precision due to floating point inprecision

* Updating return type

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

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

* Added test cases for more coverage

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

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

* Make improvements based on Rohan's suggestions

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

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

* Update financial/present_value.py

Committed first suggestion

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

* Update financial/present_value.py

Committed second suggestion

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

* Update financial/present_value.py

Committed third suggestion

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

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

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

---------

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-04-30 19:33:22 +02:00
Christian Clauss
4c1f876567
Solving the Top k most frequent words problem using a max-heap (#8685)
* Solving the `Top k most frequent words` problem using a max-heap

* Mentioning Python standard library solution in `Top k most frequent words` docstring

* ruff --fix .

* updating DIRECTORY.md

---------

Co-authored-by: Amos Paribocci <aparibocci@gmail.com>
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-04-27 23:02:07 +05:30