* Add evil_number algorithm in maths/special_numbers
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
---------
Co-authored-by: SARATHI-78 <sundarasarathi78@gmail.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>
* removed nth node
* added link to learn about algo
* Addressed PR feedback
* update bot comments
* update type
* new branch
* new branch
* latest updates with typing
* latest updates with typing
* fix:bucket count type
* fixed TypeError
* Refine docstring and adjust return statement
Updated docstring for partition_liked_list method to clarify behavior. Changed return statement from None to None for consistency.
* Add script to map open PRs to modified files
This script lists all open pull requests in the current directory's git repository and maps each file touched by any open PR to its corresponding PR numbers. It outputs the results in GitHub-flavored Markdown format.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add noqa comments for subprocess calls
Add noqa comments to suppress specific linting warnings.
---------
Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add XOR Linked List implementation with doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add XOR Linked List implementation with doctests
* Add XOR Linked List implementation with doctests
* Add XOR Linked List implementation with doctests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* updating DIRECTORY.md
* Refine docstring and variable comment in XOR linked list
Updated docstring for clarity and corrected 'ids' to 'IDs'.
* Refactor Node class to use dataclass
Refactor Node class to use dataclass for cleaner syntax.
* [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>
Co-authored-by: cclauss <cclauss@users.noreply.github.com>
Annotate the unambiguous, primitive/container-returning public methods
flagged by ruff ANN201 across data_structures/ (int/bool/float/list/dict
and one fluent self-return). Reduces ANN201 in this directory from 58 to 36.
Element-typed and sentinel-union returns (e.g. node .data getters,
dict|False in the Sudoku solver) are intentionally left for follow-up,
since they warrant generics/TypeVar or a type checker rather than a guess.
Refs #15296
Refactor Node class to use dataclass for attributes and update iter_linked_list to yield node data. Remove print_linked_list function and update merge function to use direct comparison.
* Fix ty invalid assignment diagnostics
* updating DIRECTORY.md
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix unused typing import
* Fix gradient accumulation type handling
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix automatic differentiation gradient dtype handling
---------
Co-authored-by: kadubhumika <kadubhumika@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Update comments for linked list script.
* Add doctests for the linked list script.
* Update from_sequence.py
---------
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Generic type hint in DDL
Instead of forcing int
* Update doubly_linked_list_two.py
* Update doubly_linked_list_two.py
---------
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
* Enable ruff PGH003 rule
* Fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Added doctests to the swap_nodes file under linkedlist data structure
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Added doctests to the swap_nodes file under linkedlist data structure
* Added doctests to the swap_nodes file under linkedlist data structure
* Added doctests to the swap_nodes file under linkedlist data structure
* Update swap_nodes.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>
* add doctest ut
* test complete
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* format
* ruff update
* cover line 154
* Update data_structures/linked_list/is_palindrome.py
Co-authored-by: Christian Clauss <cclauss@me.com>
* use dataclass
* pre-commit fix
* Fix mypy errors
* use future annotations
---------
Co-authored-by: Harsha Kottapalli <skottapalli@microsoft.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>