Commit Graph

3405 Commits

Author SHA1 Message Date
Ope Oluwaferanmi
52a987ea2f
Add docstrings and doctests and fix a bug ciphers/trifid_cipher.py (#10716)
* Added docstrings,doctests and fixed a bug

* Added docstrings,doctests and fixed a bug

* Added docstrings,doctests and fixed a bug

* Added docstrings and doctests with a bug fix

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

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

* Added docstrings and doctests with a bug fix

* Update ciphers/trifid_cipher.py

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

* Update ciphers/trifid_cipher.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

* Docstrings edit

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

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

* Update trifid_cipher.py

* Update pyproject.toml

---------

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-10-20 23:28:21 +02:00
Saptadeep Banerjee
579937613a
Added New Tests in Signum (#10724)
* Added new tests!

* [ADD]: Inproved Tests

* fixed

* Removed spaces

* Changed the file name

* Added Changes

* changed the code and kept the test cases

* changed the code and kept the test cases

* missed the line

* removed spaces

* Update power_using_recursion.py

* Added new tests in Signum

* Few things added

* Removed few stuff and added few changes

* Fixed few things

* Reverted the function

* Update maths/signum.py

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

* Added few things

* Update maths/signum.py

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

* Added the type hint back

* Update signum.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-20 13:02:30 +02:00
Tianyi Zheng
ce0ede6476
Fix typo in DPLL file name (#10723)
* Fix DPLL file name

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-20 09:08:23 +02:00
Tianyi Zheng
6f2d6f72d5
Move files for special numbers to own directory (#10714) 2023-10-20 08:17:31 +02:00
shivaparihar6119
197604898b
Concatenates both check bipatrite graphs(bfs&dfs) (#10708)
* sync

* fixes#8098

* deleted:    graphs/check_bipartite_graph_all.py
	new file:   graphs/check_bipatrite,py

* renamed:    graphs/check_bipatrite,py -> graphs/check_bipatrite.py

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

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

* Add the new tests

---------

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-10-20 08:09:58 +02:00
RaymondDashWu
82fc24ce96
Test cases for check_bipartite_graph_bfs (#10688)
* [ADD] tests for check_bipartite_graph_bfs

* linter fix?

* linter fix

* [ADD] more test cases check_bipartite_graph_bfs

* doctest fixes. Forgot to add 'Traceback...'

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

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

* missed a Traceback

* Update check_bipartite_graph_bfs.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-10-20 06:42:20 +02:00
Saptadeep Banerjee
4154428351
[ADD]: Improved tests in power recursion! (#10664)
* Added new tests!

* [ADD]: Inproved Tests

* fixed

* Removed spaces

* Changed the file name

* Added Changes

* changed the code and kept the test cases

* changed the code and kept the test cases

* missed the line

* removed spaces

* Update power_using_recursion.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-20 06:29:24 +02:00
Tianyi Zheng
51805338af
Fix ruff error in machine_learning/sequential_minimum_optimization.py (#10717)
* updating DIRECTORY.md

* Try to fix ruff error in sequential_minimum_optimization.py

* Update sequential_minimum_optimization.py

* Update sequential_minimum_optimization.py

* Update sequential_minimum_optimization.py

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-20 05:35:38 +02:00
Adam Ross
9875f374f4
Consolidate bubble sort iterative and recursive (#10651)
* Consolidate bubble sort iterative and recursive

* Update sorts/bubble_sort.py

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

* Refactor bubble sort func signature, doctest, timer

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

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

* Update bubble_sort.py

---------

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-10-19 22:45:51 +02:00
Anupamaraie
34f48b684b
Create vernam_cipher.py (#10702)
* Create vernam_cipher.py

added vernam cipher

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

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

* Update vernam_cipher.py

added return type

* Update vernam_cipher.py

added type hint for plaintext and key

* Update vernam_cipher.py

added tests

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

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

* Update vernam_cipher.py

Added tests

* Update vernam_cipher.py

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

* Update vernam_cipher.py

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

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

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

* Update vernam_cipher.py

* Update ciphers/vernam_cipher.py

* Update vernam_cipher.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-10-19 22:05:16 +02:00
NikhithaBandari
be94690dec
Create swap_all_odd_and_even_bits.py (#10692)
* Create swap_all_odd_and_even_bits.py

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

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

* Update swap_all_odd_and_even_bits.py

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

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

* 6: 00000110 --> 9: 00001001

* Update swap_all_odd_and_even_bits.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>
2023-10-19 19:49:47 +02:00
Christian Clauss
26ffad9d17
Simplify is_bst.py (#10627)
* Simplify is_bst.py

* updating DIRECTORY.md

* Update is_bst.py

* Rename is_bst.py to is_sorted.py

* updating DIRECTORY.md

* Update data_structures/binary_tree/is_sorted.py

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

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-19 13:31:51 -04:00
ketan96-m
6987614067
*added docstring and doctest for find_isolated_nodes (#10684)
*added docstring and doctest for edglist

*added docstring and doctest for adjm

Co-authored-by: Ketan <ketanbmahajan@gmail.com>
2023-10-19 16:48:53 +02:00
Ankit Avinash
bd3072b845
Added Mean Squared Logarithmic Error (MSLE) Loss Function (#10637)
* Added Mean Squared Logarithmic Error (MSLE)

* Added Mean Squared Logarithmic Error (MSLE)

* [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-10-19 10:46:39 -04:00
Abílio Azevedo
289a4dd6d3
docs: add test scenarios to pull request template (#10396)
* docs: add test scenarios to pull request template

* Update .github/pull_request_template.md

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-19 16:35:41 +02:00
anshul-2010
33888646af
Edit Distance Algorithm for String Matching (#10571)
* Edit Distance Algorithm for String Matching

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

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

* Apply suggestions from code review

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

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

* Update edit_distance.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: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-19 08:38:02 -04:00
Iyiola Aloko
b301e589e2
Update binary_exponentiation.py (#10342)
Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-19 08:21:48 -04:00
rtang09
30c8d5573a
Update binary_exponentiation.py (#10253)
* Update binary_exponentiation.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>
2023-10-19 08:15:23 -04:00
rtang09
9adb7ced16
Update primelib.py (#10209)
* Update primelib.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: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-19 08:02:04 -04:00
Shivansh Bhatnagar
572de4f15e
Added A General Swish Activation Function inNeural Networks (#10415)
* Added A General Swish Activation Function inNeural Networks

* Added the general swish function in the SiLU function and renamed it as swish.py

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

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

---------

Co-authored-by: Shivansh Bhatnagar <shivansh.bhatnagar.mat22@iitbhu.ac.in>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-18 10:50:18 -04:00
Poojan Smart
361f64c21d
Adds hinge loss function algorithm (#10628)
* Adds exponential moving average algorithm

* code clean up

* spell correction

* Modifies I/O types of function

* Replaces generator function

* Resolved mypy type error

* readibility of code and documentation

* Update exponential_moving_average.py

* Adds hinge loss function

* suggested doc and refactoring changes

* refactoring

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-18 10:09:13 -04:00
Jai Vignesh J
788e4ede9b
Fix doctest power recursion (#10659)
* Added doctests to power_using_recursion.py

* Added doctest to power_using_recursion.py

* Update power_using_recursion.py

* Update power_using_recursion.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-18 00:50:57 +02:00
Manmita Das
9da6f48b46
Add binary_coded_decimal.py (#10656)
* added decimal to bcd sequence

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

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

* updated with fixes

* Update and rename bcd_sequence.py to binary_coded_decimal.py

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

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

* Update binary_coded_decimal.py

* Update binary_coded_decimal.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>
2023-10-18 00:37:57 +02:00
Marek Mazij
9de1c49fe1
feat: Polish ID (PESEL) checker added (#10618)
* feat: Polish ID (PESEL) checker added

* refactor: 'sum' variable renamed to 'subtotal'

* style: typos

* Apply suggestions from code review

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

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

---------

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-10-17 20:24:16 +02:00
Anubhavpandey27
09c2b2d006
Add arrays/sudoku_solver.py (#10623)
* Create Sudoku_Solver

Each of the digits 1-9 must occur exactly once in each row.
Each of the digits 1-9 must occur exactly once in each column.
Each of the digits 1-9 must occur exactly once in each of the 9 3x3 sub-boxes of the grid.
The '.' character indicates empty cells.

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

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

* Rename Sudoku_Solver to sudoku_solver.py

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

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

* Update sudoku_solver.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>
2023-10-17 19:07:40 +02:00
RaymondDashWu
72bd653e04
Test cases for all_combinations (#10633)
* [ADD] Test cases for all_combinations

* [DEL] documentation reverted b/c redundant

* Update all_combinations.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-17 16:57:33 +02:00
ojas wani
ac3bd1032c
Add matrix_multiplication (#10045)
* added laplacian_filter file

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

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

* updated laplacian.py

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

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

* updated laplacian_py

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

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

* updated laplacian_filter.py

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

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

* updated laplacian_filter.py

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

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

* updated laplacian_filter.py

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

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

* required changes to laplacian file

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

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

* changed laplacian_filter.py

* changed laplacian_filter.py

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

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

* changed laplacian_filter.py

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

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

* changed laplacian_filter.py

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

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

* updated laplacian_filter.py

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

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

* update laplacian_filter.py

* update laplacian_filter.py

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

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

* update laplacian_filter.py

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

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

* changed laplacian_filter.py

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

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

* changed laplacian_filter.py

* changed laplacian_filter.py

* changed laplacian_filter.py

* add matrix_multiplication.py

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

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

* update matrix_multiplication

* update matrix_multiplication

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

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

* make changes

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

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

* update

* update

* updates

* resolve conflict

* add doctest

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

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

* make changes

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

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

* update laplacian.py

* add doctests

* more doctest added

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

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

* try to resolve ruff error

* try to reslve ruff error

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

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

* update doctest

* attemp - resolve ruff error

* resolve build error

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

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

* resolve build issue

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

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

* update build

* doctest update

* update doctest

* update doctest

* update doctest

* fix ruff error

* file location changed

* Delete digital_image_processing/filters/laplacian_filter.py

* Create laplacian_filter.py

* Update matrix_multiplication_recursion.py

* Update matrix_multiplication_recursion.py

* Update matrix_multiplication_recursion.py

* Update matrix_multiplication_recursion.py

* Update matrix_multiplication_recursion.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-10-17 11:25:25 +02:00
Kushagra Agarwal
c6c3bd3399
Hacktoberfest: Added Octal Number to Hexadecimal Number Conversion Algorithm (#10533)
* Added Octal to Hexadecimal Conversion program under 'conversions' directory

* Update conversions/octal_to_hexadecimal.py

fix: minor improvement to directly return hexadecimal value

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

* Update conversions/octal_to_hexadecimal.py

fix: improvement updates to octal to hexadecimal

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

* Update conversions/octal_to_hexadecimal.py

fix: Readablility improvements to octal to hexadecimal convertor

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

* Update conversions/octal_to_hexadecimal.py

fix: readability improvements in octal_to_hexadecimal.py

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

* Update conversions/octal_to_hexadecimal.py

fix: readability improvements in octal_to_hexadecimal.py

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

* fix: Fixed all the errors in octal_to_hexadecimal.py after commiting suggested changes

* fix: modified the prefix of hex numbers to the '0x' standard in octal_to_hexadecimal.py

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-17 03:10:24 -04:00
Saurabh Mahapatra
00165a5fb2
Added test cases to join.py (#10629)
* Added test cases to join.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>
2023-10-17 02:36:12 -04:00
aryandgandhi
b5786c87d8
update segmenttree docstrings Fixes #9943 (#9975)
* update docstrings

* update docstrings

* update docstrings
2023-10-17 03:25:07 +02:00
Sandeepa Dilshan Alagiyawanna
5f629b6049
Optimize and_gate and nand_gate (#10591)
* Added more optimized sudoku solver algorithm

* Added more optimized sudoku solver algorithm and File Renamed

* and_gate is Optimized

* and_gate is Optimized

* and_gate is Optimized

* [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-10-17 01:17:49 +02:00
Adarsh Sidnal
fcea18c9f0
Added an algorithm transfrom bst to greater sum tree (#9777)
* Added an algorithm transfrom bst to greater sum tree

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

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

* Update and rename transform_bst_sum_tree.py to is_sum_tree.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-10-17 00:56:14 +02:00
pre-commit-ci[bot]
922bbee80c
[pre-commit.ci] pre-commit autoupdate (#10613)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/abravalheri/validate-pyproject: v0.14 → v0.15](https://github.com/abravalheri/validate-pyproject/compare/v0.14...v0.15)

* 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-10-16 20:23:33 +02:00
halfhearted
1e468c1028
Floor and ceil in Binary search tree added (#10432)
* earliest deadline first scheduling algo added

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

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

* earliest deadline first scheduling algo added

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

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

* ceil and floor and bst

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

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

* ceil and floor and bst 2

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

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

* ceil and floor and bst 3

* Update and rename floor_ceil_in_bst.py to floor_and_ceiling.py

* Delete scheduling/shortest_deadline_first.py

---------

Co-authored-by: ArunSiva <Arunsiva003@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-10-16 19:12:33 +02:00
Vinayak Upadhyay
778e2010d6
Added functionality to calculate the diameter of given binary tree (#10526)
* Added code to find diameter of given binary tree

* Modified diameter_of_binary_tree file

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

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

* Update diameter_of_binary_tree.py

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

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

* Update diameter_of_binary_tree.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-10-16 18:46:44 +02:00
ivan53
5a1305b6fe
Fix benchmark to test with the provided number instead on 25 (#10587) 2023-10-16 10:48:26 -04:00
Saswat Susmoy
c15dda405a
Update basic_binary_tree.py (#10388)
* Update basic_binary_tree.py

* Update basic_binary_tree.py

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

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

---------

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-10-16 16:43:53 +02:00
Christian Clauss
3923e590d7
Tree_sort.py: Disable slow doctest (#10584) 2023-10-16 10:17:48 -04:00
Christian Clauss
7acf4bf73b
Rename binary_tree_traversals.md to README.md (#10599) 2023-10-16 10:16:09 -04:00
Dwarkadhish Kamthane
69707bf693
Minimization of while loop in Armstrong Numbers (#9976)
* Minimization of while loop in Armstrong Numbers

The while loop is removed and simple length calculation is used so the task of minimization of while loop is achieved

* [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-10-16 04:21:03 -04:00
Praful Katare
96f81770d7
Adds Doc test in depth_first_search_2.py (#10094)
* Adds Doc test in depth_first_search_2.py

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

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

* Fixes depth_first_search_2.py formatting

* Cleanup

---------

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-10-16 04:13:34 -04:00
hollowcrust
e9b3f20cec
Delete dynamic_programming/longest_sub_array.py (#10073) 2023-10-16 04:03:16 -04:00
Kamil
3c14e6ae3a
Refactoring and optimization of the lu_decomposition algorithm (#9231)
* Replacing the generator with numpy vector operations from lu_decomposition.

* Revert "Replacing the generator with numpy vector operations from lu_decomposition."

This reverts commit ad217c6616.

* Replacing the generator with numpy vector operations from lu_decomposition.
2023-10-16 03:29:46 -04:00
Akshar Goyal
f4ff73b1bd
Converted tests into doctests (#10572)
* Converted tests into doctests

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

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

* Removed commented code

* [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-10-16 03:21:43 -04:00
Yousha Mahamuni
cc0405d05c
Update volume.py with volume of Icosahedron (#9628)
* Update volume.py with volume of Icosahedron

Added function to find volume of a regular Icosahedron

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

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

* Apply suggestions from code review

* Update volume.py

---------

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-10-15 22:47:27 -04:00
Gabrielly de S. Pinto Dantas
1a26d76c60
add tests for tree_sort (#10015)
* add tests for tree_sort

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

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

* Update tree_sort.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-10-16 02:44:10 +02:00
Tianyi Zheng
bb8f194957
Delete texttable from dependencies (#10565)
* Disable unused dependencies

Comment out dependencies in requirements.txt that are only used by currently-disabled files

* Delete unused dependency
2023-10-16 02:01:01 +02:00
Chris O
c2f14e8a78
Add note to feature_request.yml about not opening issues for new algorithms (#10142) 2023-10-16 01:44:06 +02:00
Tianyi Zheng
73ebf7bdb1
Move and rename maths/greedy_coin_change.py (#10418)
* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* Move greedy_coin_change.py to greedy_methods/ and rename file

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-16 01:42:55 +02:00
Tianyi Zheng
b6b45eb1ce
Fix numpy deprecation warning in 2_hidden_layers_neural_network.py (#10424)
* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* updating DIRECTORY.md

* Fix deprecation warning in 2_hidden_layers_neural_network.py

Fix numpy deprecation warning:
DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-16 01:41:45 +02:00