Commit Graph

3378 Commits

Author SHA1 Message Date
Ravi Kumar
444dfb0a0f
Added adams-bashforth method of order 2, 3, 4, 5 (#10969)
* added runge kutta gills method

* added adams-bashforth method of order 2, 3, 4, 5

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

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

* Update adams_bashforth.py

* Deleted extraneous file, maths/numerical_analysis/runge_kutta_gills.py

* Added doctests to each function adams_bashforth.py

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

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

* Update adams_bashforth.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-29 00:12:17 +02:00
Khushi Shukla
d80ee90178
Create crossword_puzzle_solver.py (#11011)
* Create crossword_puzzle_solver.py

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

* Update backtracking/crossword_puzzle_solver.py

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

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

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

* Update crossword_puzzle_solver.py

* Apply suggestions from code review

* Update crossword_puzzle_solver.py

* Update crossword_puzzle_solver.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-28 23:13:14 +02:00
Suyash Dongre
b51b833e0a
Added doctest to heap.py (#11059) 2023-10-28 21:43:20 +02:00
Shreya123714
f2436318ce
Add FuzzySet Class for Triangular Fuzzy Sets (#11036)
* Added Opertation for triangular fuzzy sets

* Added Sources

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

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

* Fix the bug , for which test were failing

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

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

* Add type hints and improve parameter names

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

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

* Add Test For fuzzy_operations.py

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

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

* Fix the bug in fuzzy_operations.py

* Add test_fuzzy_logic.py

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

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

* Fix the bug in fuzzy_operations.py & deleted test

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

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

* fixed the typo error

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

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

* Again done

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

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

* corrected wrong intendation due to which test fail

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

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

* Fix

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

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

* bug fixed

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

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

* Add test_fuzzy_logic

* Modified fuzzy_operations.py

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

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

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

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

* Fixed the bug, made a FuzzySet dataclass

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

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

* Replaced assertEqual of unittest to assert python

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

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

* lets see

* Changed test

* orderd the import statements

* Add docstring and dataclass the FuzzySet

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

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

* Update fuzzy_operations.py

* Delete fuzzy_logic/test_fuzzy_logic.py

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

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

* https://en.wikipedia.org/wiki/Fuzzy_set

---------

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-28 20:32:12 +02:00
Manmita Das
1e1ee00782
Excess 3 code (#11001)
* added excess-3 code

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

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

* updated with fixes

* updated with fixes

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

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

* Update excess_3_code.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-27 23:48:15 +02:00
Sanket Nikam
a0e80a74c8
Added Gradient Boosting Classifier (#10944)
* Added Gradient Boosting Classifier

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

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

* Update gradient_boosting_classifier.py

* Update gradient_boosting_classifier.py

* Update gradient_boosting_classifier.py

* Update gradient_boosting_classifier.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-27 23:17:58 +02:00
Tiela Rose Black-Law
5df16f11eb
Add doctest to hashes/hamming_code.py (#10961) 2023-10-27 23:13:51 +02:00
RaymondDashWu
0eb1825af2
Tests for odd_even_transposition_parallel (#10926)
* [ADD] tests for odd_even_transposition_parallel

* adding another test because build failed 6 hrs

* comment out all tests to see if it fails

* list(range(10)[::-1]) test uncommented

* [a, x, c] test uncommented

* [1.9, 42.0, 2.8] test uncommented

* [False, True, False] test uncommented

* [1, 32.0, 9] test uncommented

* [1, 32.0, 9] test uncommented

* [-442, -98, -554, 266, -491, 985, -53, -529, 82, -429] test uncommented

* test non global lock

* [DEL] Testing multiple data types. Couldn't get doctest to work

* [ADD] Comment on why non global process lock
2023-10-27 22:13:32 +02:00
Adam Ross
b0837d3985
Increase code coverage for dijkstra algorithm (#10695)
* Increase code coverage for dijkstra algorithm

* Add missing code coverage

Refactor to pass mypy

* Fix missing code coverage

* Remove code changes, keep doctest

* Remove ALL of the code changes

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

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

* Update dijkstra_algorithm.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-27 22:10:32 +02:00
Khushi Shukla
185a35589a
Create monotonic_array.py (#11025)
* Create monotonic_array.py

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

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

* Update monotonic_array.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-27 12:42:34 -04:00
Suyash Dongre
f336cca8f8
Added doctest to double_hash.py (#11020)
* Added doctest to double_hash.py

* Update double_hash.py
2023-10-27 12:40:42 -04:00
Poojan Smart
e4eda14583
Add perplexity loss algorithm (#11028) 2023-10-27 10:44:33 -04:00
Suyash Dongre
34eb9c529a
Added doctest to hash_table.py (#11023)
* Added doctest to hash_table.py

* Update hash_table.py

* Update hash_table.py

* Update hash_table.py

* Update hash_table.py

* Apply suggestions from code review

* Update hash_table.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-27 14:36:43 +02:00
Poojan Smart
5987f86192
Add automatic differentiation algorithm (#10977)
* Added automatic differentiation algorithm

* file name changed

* Resolved pre commit errors

* updated dependency

* added noqa for ignoring check

* adding typing_extension for adding Self type in __new__

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

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

* sorted requirement.text dependency

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

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

* resolved ruff

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-10-27 10:47:24 +02:00
Suyash Dongre
fe4aad0ec9
Added doctest & docstring to quadratic_probing.py (#10996)
* Added doctest & docstring to quadratic_probing.py

* Update quadratic_probing.py

* Update quadratic_probing.py
2023-10-26 17:21:45 +02:00
Ed
a8dfd403f6
Add new algorithm index_2d_array_in_1d (#10973)
* Add new algorithm index_2d_array_in_1d

* Add doctest for iter function

* The power of dataclasses

* Update index_2d_array_in_1d.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-26 16:33:42 +02:00
Tiela Rose Black-Law
34b25c0c76
Add doctest for maths/primelib (#10978) 2023-10-26 14:52:47 +02:00
Kishan Kumar Rai
8adbf47c75
Fix Typo & Grammatical Errors (#10980) 2023-10-26 14:51:28 +02:00
Tianyi Zheng
579250363d
Speed up dijkstra_bankers_algorithm.py (#10861)
* updating DIRECTORY.md

* Rename dijkstra_bankers_algorithm.py

* Remove sleep() call

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-26 14:36:53 +02:00
Akash_Jambulkar
69f7f3208e
Update cocktail_shaker_sort.py (#10987)
* Update cocktail_shaker_sort.py

Added a docstring with clear explanations of the function and its parameters.

Changed variable names i, start, and end for better readability.

Improved comments to describe the purpose of each section of the algorithm.

Adjusted the loop ranges to make the code more concise and readable.

Removed redundant comments and variable assignments.

Provided a clear message when printing the sorted list.

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

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

* Update cocktail_shaker_sort.py

* typing: ignore[operator]

* Update cocktail_shaker_sort.py

* Update cocktail_shaker_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-26 14:27:31 +02:00
Suyash Dongre
29b8ccdc2f
Added doctest to hash_table.py (#10984) 2023-10-26 14:12:28 +02:00
Habip Akyol
42c49ee117
Fix typo in haralick_descriptors.py (#10988) 2023-10-26 13:24:17 +02:00
Neha
6497917352
Added Kth largest element algorithm (#10687)
* neha3423

* neha3423

* neha3423

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

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

* neha3423

* neha3423

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

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

* neha323

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

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

* neha3423

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

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

* neha3423

* neha3423

* neha3423

* neha3423

* Added test case for tuple

* Update kth_largest_element.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-26 10:54:30 +02:00
Saurabh Mahapatra
ade2837e41
Update capitalize.py (#10573)
* Update capitalize.py

* Update strings/capitalize.py

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-26 04:25:08 -04:00
Mary-0165
e791a2067b
Capacitor equivalence algorithm (#9814)
* capacitor equivalence algorithm

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

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

* Apply suggestions from code review

* Update capacitor_equivalence.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-26 04:10:13 -04:00
Sanjay
e5a6a97c32
Added Lens formulae to the Physics repository (#10187)
* Added Lens formulae to the Physics repository

* Resolved the commented issues

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

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

* Update lens_formulae.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-26 03:58:40 -04:00
Suyash Dongre
dd7d18d49e
Added doctest, docstring and typehint for sigmoid_function & cost_function (#10828)
* Added doctest for sigmoid_function & cost_function

* Update logistic_regression.py

* Update logistic_regression.py

* Minor formatting changes in doctests

* Apply suggestions from code review

* Made requested changes in logistic_regression.py

* Apply suggestions from code review

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-26 03:55:56 -04:00
Ravi Kumar
c71c280726
added runge kutta gills method to maths/ numerical_analysis (#10967)
* added runge kutta gills method

* Apply suggestions from code review

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-26 03:20:28 -04:00
Ed
a8f05fe0a5
Add doctests and type hints (#10974)
* Add doctests and type hints

* Apply suggestions from code review

* Update tarjans_scc.py

* Update tarjans_scc.py

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-26 03:02:35 -04:00
Megan Payne
1a5d5cf93d
Mean absolute error (#10927)
* added mean absolute error to loss_functions.py

* added doctest to mean absolute error to loss_functions.py

* fixed long line in loss_functions.py

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

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

* fixed error in MAE

* Update machine_learning/loss_functions.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: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-26 01:31:47 -04:00
Dale Dai
0e7f8284a3
Add error tests in doctest and fix error message (#10930)
* Add error tests in doctest and fix error message

* Change AssertationError to ValueError

* [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-26 01:27:46 -04:00
Humzafazal72
0ffe506ea7
added mean absolute percentage error (#10464)
* added mean absolute percentage error

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

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

* added mean_absolute_percentage_error

* added mean_absolute_percentage_error

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

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

* added mean_absolute_percentage_error

* added mean_absolute_percentage_error

* added mean absolute percentage error

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

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

* added mean absolute percentage error

* added mean absolute percentage error

* added mean absolute percentage error

* added mean absolute percentage error

* added mean absolute percentage error

* Update machine_learning/loss_functions.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-25 19:05:35 -04:00
Bisma nadeem
e1e5963812
Code Enhancements in merge_sort.py (#10911)
* Code Enhancements in merge_sort.py 

This enhanced code includes improved variable naming, error handling for user input, and more detailed docstrings. It's now more robust and 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-10-25 17:26:54 -04:00
AdityaAtoZ
3d0a409ce1
Improved Equilibrium Index of an Array. (#10899)
* Improved Equilibrium Index of an Array.

This is the modifications made to the original code:

1. Create Doctest Instructions: Python "doctest" can be executed by running the following command: python -m doctest -v equilibrium_index.py.

2. Deleted Argument {size}: Deleted the `size` argument because `len(arr)} allows the array's length to be determined inside the function, simplifying and improving the readability of the function signature.

3. Used {enumerate}: To improve code readability and indicate that we're working with element-index pairs, we iterated through the array using both elements and their indices using the `enumerate` function.

4. Optimized the Loop: To prevent pointless additions, the loop was improved by initializing {left_sum} with the value of the first element (arr[0]). Furthermore, since the beginning and last items (0 and size - 1) cannot be equilibrium indices, there is no need to check them, saving further computations.

* [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-25 16:33:35 -04:00
Christian Clauss
c2c6cb0f5c
Add dataclasses to binary_search_tree.py (#10920) 2023-10-25 16:28:23 -04:00
Iyiola Aloko
76acc6de60
Adding doctests to frequency_finder.py (#10341)
* Update frequency_finder.py

* Update frequency_finder.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-24 21:53:31 +00:00
Bisma nadeem
dab4e64896
Code enhancements in binary_insertion_sort.py (#10918)
* Code enhancements in binary_insertion_sort.py

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

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

* Apply suggestions from code review

---------

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-24 23:51:04 +02:00
Hardik Pawar
fd227d8026
Add function docstrings, comments and type hints (#10893)
* Add function docstrings, comments and type hints

* Fix type mismatch

* Fix type hint error

* Fix float to int error

* Update ford_fulkerson.py

* Update ford_fulkerson.py

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

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

* Update ford_fulkerson.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-24 23:35:38 +02:00
Dhruv Manilawala
28302db941
Remove myself from CODEOWNERS (#10220) 2023-10-24 17:53:17 +02:00
Hardik Pawar
aeee0f42a5
Add doctests for fractional knapsack (#10891)
* Add doctests for fractional knapsack

* Update greedy_methods/fractional_knapsack.py

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

* Run doctests

* Update greedy_methods/fractional_knapsack.py

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

* Update greedy_methods/fractional_knapsack.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-24 16:36:24 +02:00
Saptadeep Banerjee
28f4c16132
Tried new TESTS for the binomial_coefficient (#10822)
* Tried new TESTS for the binomial_coefficient

* Fix the tests request

* Update binomial_coefficient.py

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

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

* Update binomial_coefficient.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-24 15:46:00 +02:00
SEIKH NABAB UDDIN
a23dd7ecbe
Change from only weatherstack to both (#10882)
* Update current_weather.py

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

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

* Update current_weather.py

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

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

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

* Update current_weather.py

* Update current_weather.py

* Update current_weather.py

* Update current_weather.py

* import requests

---------

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-24 15:12:32 +02:00
Christian Clauss
eb17fcf8f5
Use dataclasses in circular_linked_list.py (#10884)
* Use dataclasses in circular_linked_list.py

* updating DIRECTORY.md

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-24 08:45:36 -04:00
Bhavesh Mathur
17059b7ece
Added doctests , type hints for other/nested_brackets.py (#10872)
* Added doctests , type hints

* Update nested_brackets.py

---------

Co-authored-by: Christian Clauss <cclauss@me.com>
2023-10-24 11:03:22 +02:00
Gourav Raj
481aff7928
Add Mirror a Binary Tree solution (#9534)
* Add `Invert a Binary Tree` solution

* Add type

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

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

* Add `doctest`

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

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

* Add `test` to `get_tree_inorder`

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

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

* Add `test` changes

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

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

* Fix lint errors

* Fix precommit errors

* Update and rename invert_binary_tree.py to mirror_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-24 09:54:38 +02:00
Marek Mazij
6971af2416
feat: RGB to CMYK color converter (#10741)
* feat: code functional, commented, tested

* fix: compering types, exception msg, line length

* fix: type hints
2023-10-23 18:22:09 -04:00
Tianyi Zheng
b98312ca9f
Consolidate Newton-Raphson implementations (#10859)
* updating DIRECTORY.md

* updating DIRECTORY.md

* Consolidate Newton-Raphson duplicates

* Rename consolidated Newton-Raphson file

* updating DIRECTORY.md

* updating DIRECTORY.md

* Fix doctest precision

* Fix doctest precision again

---------

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2023-10-23 16:37:17 -04:00
pre-commit-ci[bot]
e5d6969f38
[pre-commit.ci] pre-commit autoupdate (#10856)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.1.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.292...v0.1.1)
- [github.com/psf/black: 23.9.1 → 23.10.0](https://github.com/psf/black/compare/23.9.1...23.10.0)
- [github.com/pre-commit/mirrors-mypy: v1.6.0 → v1.6.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.6.0...v1.6.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-10-23 22:29:16 +02:00
SEIKH NABAB UDDIN
ffd3a56c35
Updated Selection Sort (#10855)
* Update selection_sort.py

* Update selection_sort.py
2023-10-23 14:12:28 -04:00
Aqib Javid Bhat
30122062b9
Add Floyd's Cycle Detection Algorithm (#10833)
* Add Floyd's Cycle Detection Algorithm

* Add tests for add_node function

* Apply suggestions from code review

* Update floyds_cycle_detection.py

---------

Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
2023-10-23 13:56:43 -04:00