Commit Graph

3037 Commits

Author SHA1 Message Date
Maxim Smolskiy
9720e6a6cf
Add Project Euler problem 117 solution 1 (#6872)
Update DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-03-02 22:21:48 +05:30
Maxim Smolskiy
ee778128bd
Reduce the complexity of other/scoring_algorithm.py (#8045)
* Increase the --max-complexity threshold in the file .flake8
2023-03-02 10:27:07 +05:30
Maxim Smolskiy
069a14b1c5
Add Project Euler problem 082 solution 1 (#6282)
Update DIRECTORY.md
---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-03-02 10:25:47 +05:30
Christian Clauss
64543faa98
Make some ruff fixes (#8154)
* Make some ruff fixes

* Undo manual fix

* Undo manual fix

* Updates from ruff=0.0.251
2023-03-01 17:23:33 +01:00
pre-commit-ci[bot]
1c15cdff70
[pre-commit.ci] pre-commit autoupdate (#8160)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/tox-dev/pyproject-fmt: 0.9.1 → 0.9.2](https://github.com/tox-dev/pyproject-fmt/compare/0.9.1...0.9.2)

* pre-commit: Add ruff

---------

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-02-27 23:08:40 +01:00
pre-commit-ci[bot]
67676c3b79
[pre-commit.ci] pre-commit autoupdate (#8149)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/tox-dev/pyproject-fmt: 0.8.0 → 0.9.1](https://github.com/tox-dev/pyproject-fmt/compare/0.8.0...0.9.1)
- [github.com/pre-commit/mirrors-mypy: v1.0.0 → v1.0.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.0.0...v1.0.1)

* [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-02-21 08:33:44 +01:00
Jan Wojciechowski
1bf03889c5
Update bogo_sort.py (#8144) 2023-02-20 11:14:01 +13:00
pre-commit-ci[bot]
126e89d8a3
[pre-commit.ci] pre-commit autoupdate (#8141)
updates:
- [github.com/tox-dev/pyproject-fmt: 0.6.0 → 0.8.0](https://github.com/tox-dev/pyproject-fmt/compare/0.6.0...0.8.0)
- [github.com/pre-commit/mirrors-mypy: v0.991 → v1.0.0](https://github.com/pre-commit/mirrors-mypy/compare/v0.991...v1.0.0)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-02-13 22:05:56 +01:00
Damon Gregory
77b4fa8b3f
fix_ci_badge (#8134) 2023-02-12 16:55:25 +01:00
Christian Clauss
c909da9b08
pre-commit: Upgrade psf/black for stable style 2023 (#8110)
* pre-commit: Upgrade psf/black for stable style 2023

Updating https://github.com/psf/black ... updating 22.12.0 -> 23.1.0 for their `2023 stable style`.
* https://github.com/psf/black/blob/main/CHANGES.md#2310

> This is the first [psf/black] release of 2023, and following our stability policy, it comes with a number of improvements to our stable style…

Also, add https://github.com/tox-dev/pyproject-fmt and https://github.com/abravalheri/validate-pyproject to pre-commit.

I only modified `.pre-commit-config.yaml` and all other files were modified by pre-commit.ci and psf/black.

* [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-02-01 18:44:54 +05:30
pre-commit-ci[bot]
ed0a581f93
[pre-commit.ci] pre-commit autoupdate (#8107)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/PyCQA/isort: 5.11.4 → 5.12.0](https://github.com/PyCQA/isort/compare/5.11.4...5.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-01-30 23:42:15 +01:00
Tianyi Zheng
57c12fab28
Fix mypy errors in lorentz_transformation_four_vector.py (#8075)
* updating DIRECTORY.md

* Fix mypy errors in lorentz_transformation_four_vector.py

* Remove unused symbol vars

* Add function documentation and rewrite algorithm explanation

Previous explanation was misleading, as the code only calculates Lorentz
transformations for movement in the x direction (0 velocity in the y and
z directions) and not movement in any direction

* updating DIRECTORY.md

* Update error message for speed

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-01-26 08:13:03 +01:00
Caeden Perelli-Harris
c00af459fe
feat: Concatenate both factorial implementations (#8099)
* feat: Concatenate both factorial implementations

* fix: Rename factorial recursive method
2023-01-26 08:12:11 +01:00
MohammadReza Balakhaniyan
1a27258bd6
gcd_of_n_numbers (#8057)
* add maths/Gcd of N Numbers

* add maths/Gcd of N Numbers

* add maths/Gcd of N Numbers

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

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

* add maths/Gcd of N Numbers

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

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

* add maths/Gcd of N Numbers

* add maths/Gcd of N Numbers

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

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

* add maths/Gcd of N Numbers

* add maths/Gcd of N Numbers

* more pythonic

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

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

* more pythonic

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

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

* merged

* merged

* more readable

* [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-01-10 23:47:02 +01:00
Caeden Perelli-Harris
4939e8463f
Create cached fibonacci algorithm (#8084)
* feat: Add `fib_recursive_cached` func

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

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

* doc: Show difference in time when caching algorithm

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-01-07 17:56:39 +01:00
Abhishek Mulik
32a1ff9359
Update is_palindrome.py (#8022) 2023-01-04 13:47:15 +13:00
Tianyi Zheng
9f041e9cc8
Refactor sierpinski_triangle.py (#8068)
* updating DIRECTORY.md

* Update sierpinski_triangle.py header doc

* Remove unused PROGNAME var in sierpinski_triangle.py

The PROGNAME var was used to print an image description in the reference
code that this implementation was taken from, but it's entirely unused
here

* Refactor triangle() function to not use list of vertices

Since the number of vertices is always fixed at 3, there's no need to
pass in the vertices as a list, and it's clearer to give the vertices
distinct names rather than index them from the list

* Refactor sierpinski_triangle.py to use tuples

Tuples make more sense than lists for storing coordinate pairs

* Flip if-statement condition in sierpinski_triangle.py to avoid nesting

* Add type hints to sierpinski_triangle.py

* Add doctests to sierpinski_triangle.py

* Fix return types in doctests

* Update fractals/sierpinski_triangle.py

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2023-01-02 14:15:14 +01:00
Tianyi Zheng
725731c8d2
Refactor local_weighted_learning.py to use np.array (#8069)
* updating DIRECTORY.md

* Format local_weighted_learning.py doctests for clarity

* Refactor local_weighted_learning.py to use np.array instead of np.mat

The np.matrix class is planned to be eventually depreciated in favor of
np.array, and current use of the class raises warnings in pytest

* Update local_weighted_learning.py documentation

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-01-02 14:07:39 +01:00
Tianyi Zheng
7c1d23d448
Change prime_sieve_eratosthenes.py to return list (#8062) 2023-01-02 14:10:59 +13:00
Tianyi Zheng
d29afca93b
Fix get_top_billioners.py file name typo (#8066) 2023-01-01 14:30:14 +01:00
Alexander Pantyukhin
c6223c71d8
add word_break dynamic approach up -> down. (#8039)
* add word_break dynamic approach up -> down.

* updating DIRECTORY.md

* Update word_break.py

fix review notes.

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

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

* Update word_break.py

fix review notes

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

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

* fix review notes

* add trie type

* Update word_break.py

add typing Any to trie.

* Update dynamic_programming/word_break.py

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

* Update dynamic_programming/word_break.py

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

* Update dynamic_programming/word_break.py

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

* Update dynamic_programming/word_break.py

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

* Update dynamic_programming/word_break.py

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

* fix review notes

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: Caeden Perelli-Harris <caedenperelliharris@gmail.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-12-30 06:47:40 +01:00
Tianyi Zheng
b72d0681ec
Remove extra imports in gamma.py doctests (#8060)
* Refactor bottom-up function to be class method

* Add type hints

* Update convolve function namespace

* Remove depreciated np.float

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* Renamed function for consistency

* updating DIRECTORY.md

* Remove extra imports in gamma.py doctests

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Chris O <46587501+ChrisO345@users.noreply.github.com>
2022-12-29 18:06:26 +01:00
Lucia Harcekova
90686e39b9
Add LZ77 compression algorithm (#8059)
* - add "lz77_compressor" class with compress and decompress methods using LZ77 compression algorithm

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

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

* - use "list" instead "List", formatting

* - fix spelling

* - add Python type hints

* - add 'Token' class to represent triplet (offset, length, indicator)

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

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

* - add test, hange type rom List to list

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

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

* - remove extra import

* - remove extra types in comments

* - better test

* - edit comments

* - add return types

* - add tests for __str__ and __repr__

* Update lz77.py

* [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>
2022-12-28 18:34:35 +01:00
pre-commit-ci[bot]
27d56ba393
[pre-commit.ci] pre-commit autoupdate (#8047)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/PyCQA/isort: v5.11.3 → 5.11.4](https://github.com/PyCQA/isort/compare/v5.11.3...5.11.4)

* Update .flake8

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-12-26 22:02:50 +01:00
Maxim Smolskiy
79ef431cec
Reduce the complexity of sorts/merge_insertion_sort.py (#7954)
* Reduce the complexity of sorts/merge_insertion_sort.py

* Add tests

* Lower the --max-complexity threshold in the file .flake8
2022-12-24 15:57:28 +01:00
pre-commit-ci[bot]
d4c5b22424
[pre-commit.ci] pre-commit autoupdate (#8037)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/MarcoGorelli/auto-walrus: v0.2.1 → v0.2.2](https://github.com/MarcoGorelli/auto-walrus/compare/v0.2.1...v0.2.2)
- [github.com/PyCQA/isort: 5.10.1 → v5.11.3](https://github.com/PyCQA/isort/compare/5.10.1...v5.11.3)

* 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>
2022-12-19 23:04:34 +01:00
Victor Rodrigues da Silva
3f8b2af14b
Add autoclave cipher (#8029)
* Add autoclave cipher

* Update autoclave with the given suggestions

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

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

* Fixing errors

* Another fixes

* Update and rename autoclave.py to autokey.py

* Rename gaussian_naive_bayes.py to gaussian_naive_bayes.py.broken.txt

* Rename gradient_boosting_regressor.py to gradient_boosting_regressor.py.broken.txt

* Rename random_forest_classifier.py to random_forest_classifier.py.broken.txt

* Rename random_forest_regressor.py to random_forest_regressor.py.broken.txt

* Rename equal_loudness_filter.py to equal_loudness_filter.py.broken.txt

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-12-18 23:26:39 +01:00
Alexander Pantyukhin
30277f8590
add numbers different signs algorithm. (#8008) 2022-12-15 17:11:32 +13:00
Roberto Garcia
af8d520922
Update is_even.py (#8028) 2022-12-15 17:10:09 +13:00
pre-commit-ci[bot]
40f165b789
[pre-commit.ci] pre-commit autoupdate (#8026)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0)
- [github.com/asottile/pyupgrade: v3.3.0 → v3.3.1](https://github.com/asottile/pyupgrade/compare/v3.3.0...v3.3.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>
2022-12-12 21:29:50 +01:00
Aaryan Raj
b25915adf9
Add algorithm to convert decimal number to its simplest fraction form (#8001)
* Added algorithm to convert decimal number to its simplest fraction form

* Apply suggested changes
2022-12-11 08:04:04 +01:00
pre-commit-ci[bot]
d141fa8838
[pre-commit.ci] pre-commit autoupdate (#8017)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.2.2 → v3.3.0](https://github.com/asottile/pyupgrade/compare/v3.2.2...v3.3.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>
2022-12-05 21:34:24 +01:00
Akshay Dubey
5654c6242e
algorithm: Hexagonal number (#8003)
* feat: Add hexagonal number

* [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>
2022-11-29 19:29:21 +01:00
Alexander Pantyukhin
6a86fe4867
Add backtrack word search in matrix (#8005)
* add backtracking word search

* updating DIRECTORY.md

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

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

* review notes fixes

* additional fixes

* add tests

* small cleanup

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

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

* small cleanup 2

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

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

* Update backtracking/word_search.py

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

* Update backtracking/word_search.py

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

* Update backtracking/word_search.py

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

* Update backtracking/word_search.py

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

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>
2022-11-29 19:28:47 +01:00
Alexander Pantyukhin
47bf3f58e0
fix validation condition and add tests (#7997)
* fix validation condition and add tests

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-29 19:07:27 +01:00
pre-commit-ci[bot]
361ddaf29e
[pre-commit.ci] pre-commit autoupdate (#8006)
updates:
- [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0)
- [github.com/PyCQA/flake8: 5.0.4 → 6.0.0](https://github.com/PyCQA/flake8/compare/5.0.4...6.0.0)

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>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-11-29 21:55:30 +05:30
Christian Clauss
08c2245705
Upgrade to flake8 v6 (#8007)
* Upgrade to flake8 v6

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-29 16:56:41 +01:00
Mark Mayo
f32d611689
clean of unnecessary checks, imports, calls (#7993) 2022-11-21 00:00:27 +13:00
Alexander Pantyukhin
a25c53e8b0
Fix argument validation for count_1s_brian_kernighan_method (#7994)
* Fix argument validation for count_1s_brian_kernighan_method

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-20 23:59:25 +13:00
Swayam
f01a1af1df
Bi directional dijkstra (#7982)
* Added Bi-Directional Dijkstra

* Added Bi-Directional Dijkstra

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

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

* Added doctest and type hints

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

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

* Rename Bi_directional_Dijkstra.py to bi_directional_dijkstra.py

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

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

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

* Update bi_directional_dijkstra.py

* [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>
2022-11-20 23:55:58 +13:00
Akshay Dubey
b33ea81a74
algorithm: Add juggler sequence (#7985)
* feat: Add juggler sequence

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

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

* refactor: Remove temp variable

* refactor: Change error type for negative numbers

* refactor: Remove # doctest: +NORMALIZE_WHITESPACE

* refactor: Remove int typecasting

* test: Add unit tests for n=10 and n=25

* [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>
2022-11-18 09:18:47 +01:00
pre-commit-ci[bot]
0684ccdd69
[pre-commit.ci] pre-commit autoupdate (#7983)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/asottile/pyupgrade: v3.2.0 → v3.2.2](https://github.com/asottile/pyupgrade/compare/v3.2.0...v3.2.2)
- [github.com/pre-commit/mirrors-mypy: v0.982 → v0.990](https://github.com/pre-commit/mirrors-mypy/compare/v0.982...v0.990)

* updating DIRECTORY.md

* Update .pre-commit-config.yaml

* Downgrade to mypy v0.991 --> v0.990

* mpyp v0.991

* Update 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>
Co-authored-by: Christian Clauss <cclauss@me.com>
2022-11-15 18:34:17 +01:00
Dhruv Manilawala
8bfd1c844b
fix: mypy 0.991 issues (#7988)
* fix: mypy 0.991 issues

* fix: invalid condition for base case
2022-11-15 18:29:14 +01:00
Akshay Dubey
4ce8ad9ce6
algorithm: Liouville lambda function (#7986)
* feat: Add liouville lambda function

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

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

* refactor: Refactor if-else block

* refactor: Refactor error handling for -ve numbers

* refactor: Remove # doctest: +NORMALIZE_WHITESPACE

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-15 18:28:49 +01:00
Dhruv Manilawala
3bf86b91e7
fix: no implicit optional (#7984) 2022-11-15 14:55:14 +01:00
Gayathri Krishnan
316e71b034
Additional intro blockchain doc (#7974)
* A deeper introduction to blockchain technology

* Update README.md

Rectified errors as image was not visible

* Delete img1.jpg

Deleting the image as it is not getting accepted in PR merge

* Delete img2.jpg

Deleting the image as it is not getting accepted in PR merge

* Update README.md

Removed all image s in the document

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

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

* Update README.md

Commited the suggested changes and submitting for review.

* Update README.md

Changed a sentence that needed grammatical correction.

* Update README.md

Added the changes suggested by review panel

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-15 14:37:59 +01:00
Akshay Dubey
e1be882f72
algorithm: Twin prime (#7980)
* feat: Add twin prime algorithm

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

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

* fix: Fix broken import statement

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-11-10 11:55:50 +01:00
Alexander Pantyukhin
7b2eca0243
add distribute coins (#7975)
* add distribute coins

* updating DIRECTORY.md

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

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

* fix review notes

* fix typehint

* fix type in TreeNode

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-10 15:49:38 +13:00
Christian Clauss
5c92b7390e
prime_numbers.py: Tighten up the benchmarks (#7976)
* prime_numbers.py: Tighten up the benchmarks

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-10 15:42:14 +13:00
Christian Clauss
4cddb26908
atbash.py: Tighten up the benchmarks (#7977)
* atbash.py: Tighten up the benchmarks

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2022-11-10 15:41:28 +13:00