Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a __len__() function to doubly_linked_list.py #2042

Open
wants to merge 25 commits into
base: master
from

Conversation

@Lakshmikanth2001
Copy link
Contributor

Lakshmikanth2001 commented May 28, 2020

Blocked by #2052

Describe your change:

in linked list class constructor i have added a data member called size and a function call length

  • Add an algorithm?

Checklist:

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized.
  • I know that pull requests will not be merged if they fail the automated tests.
  • This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.
  • All new Python files are placed inside an existing directory.
  • All filenames are in all lowercase characters with no spaces or dashes.
  • All functions and variable names follow Python naming conventions.
  • All function parameters and return values are annotated with Python type hints.
  • All functions have doctests that pass the automated testing.
  • All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.
  • If this pull request resolves one or more open issues then the commit message contains Fixes: #{$ISSUE_NO}.
please add a function to get length of linked list
all size function lo doubly linked list class
Update doubly_linked_list.py
Update __init__.py
Copy link
Member

cclauss left a comment

Please undo the maths/prime_check.py change and move that to a separate pull request as discussed in CONTRIBUTING.md.

made it more pythonic
@TheAlgorithms TheAlgorithms deleted a comment from onlinejudge95 May 31, 2020
cclauss added 4 commits May 31, 2020
@github-actions github-actions bot force-pushed the Lakshmikanth2001:master branch from 43b3db5 to 22cc5d2 May 31, 2020
cclauss added 6 commits May 31, 2020
github-actions and others added 4 commits May 31, 2020
Copy link
Member

cclauss left a comment

Blocked by #2052

@cclauss cclauss changed the title adding size function to linkedlist data_strucuture Add a __len__() function to doubly_linked_list.py Jun 1, 2020
@cclauss
Copy link
Member

cclauss commented Jun 1, 2020

@Lakshmikanth2001 Thanks for this pull request because it found a flaw in doubly_linked_list.py. It would be great is you could fix that algorithm so that the tests in #2052 pass. If not, I will try to fix that at the end of this week. Thanks again.

@stale
Copy link

stale bot commented Jul 1, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Jul 1, 2020
@cclauss cclauss removed the wontfix label Jul 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.