Commit Graph

10 Commits

Author SHA1 Message Date
pre-commit-ci[bot]
bc8df6de31
[pre-commit.ci] pre-commit autoupdate (#11322)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.2.2 → v0.3.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.2.2...v0.3.2)
- [github.com/pre-commit/mirrors-mypy: v1.8.0 → v1.9.0](https://github.com/pre-commit/mirrors-mypy/compare/v1.8.0...v1.9.0)

* [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>
2024-03-13 07:52:41 +01:00
Saksham Saha
c9b4b8002f
Added an add at position subroutiune to linked list (#9020)
* added addAtPosition to simple linked list

* added addAtPosition to simple linked list

* modified the add function to take an optional position command

* fixed type safety errors:

* fixed type safety errors:

* fixed type safety errors:

* fixed type safety errors:

* fixed size error

* fixed size error

* added doctest and updates the else after checking if posiiton argument less than 0 or not

* added doctest and updates the else after checking if posiiton argument less than 0 or not

* fixed the contributing.md mistake

* added doctest for out of bounds position value, both negative and positive
2023-09-08 08:20:28 -04: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
Caeden
d5a9f649b8
Add flake8-builtins to pre-commit and fix errors (#7105)
Ignore `A003`

Co-authored-by: Christian Clauss <cclauss@me.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Dhruv Manilawala <dhruvmanila@gmail.com>
2022-10-13 19:53:59 +05:30
Christian Clauss
1ae5abfc3c
Replace typing.optional with new annotations syntax (#5829)
* Replace typing.optional with new annotations syntax

* updating DIRECTORY.md

Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
2021-11-17 04:43:02 +01:00
Parth Satodiya
d324f91fe7
Fix mypy errors for data_structures->linked_list directory files (#4927) 2021-10-07 23:18:23 +08:00
arif599
9c6080a6fc
data_structures/linked_list: Add __str__() function (#3961)
* Adding __str__() function

* Removing white space

* Update data_structures/linked_list/__init__.py

Co-authored-by: xcodz-dot <71920621+xcodz-dot@users.noreply.github.com>

* Adding type hints

* Update __init__.py

* Update __init__.py

* Adding the changes requested

* Updating to fix pre-commit

* Updating __init__.py

* Updating __init__.py

Co-authored-by: xcodz-dot <71920621+xcodz-dot@users.noreply.github.com>
2020-11-28 11:20:18 +05:30
Lakshmikanth2001
321b1425e3
data_structures/linked_list: Add __len__() function and tests (#2047)
* Update __init__.py

please add a function to get length of linked list

* Update __init__.py

* Update doubly_linked_list.py

all size function lo doubly linked list class

* prime number _better method

* comments

* Updated init.py 2

made it more pythonic

* updated length function

* commnet in linked_list construtor

* Update data_structures/linked_list/__init__.py

accepecting changes

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

* Update data_structures/linked_list/__init__.py

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

* Update __init__.py

* Revert changes to doubly_linked_list.py

* Revert changes to prime_check.py

Co-authored-by: Christian Clauss <cclauss@me.com>
2020-05-31 11:37:45 +02:00
William Zhang
9eac17a408 psf/black code formatting (#1277) 2019-10-05 10:14:13 +05:00
Alex Brown
564179a0ec increment 1 2018-10-19 07:48:28 -05:00