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

added __len__ function #1812

Open
wants to merge 2 commits into
base: master
from
Open

added __len__ function #1812

wants to merge 2 commits into from

Conversation

@Akashpycs
Copy link
Contributor

Akashpycs commented Mar 25, 2020

Added a function to count number of nodes in linked list

Added a function to count number of nodes in linked list


def __len__(self):
"""Return length of linked list i.e. number of nodes """

This comment has been minimized.

Copy link
@cclauss

cclauss Mar 25, 2020

Member

Please add some doctests.


def __len__(self):
"""Return length of linked list i.e. number of nodes """
curNode = self.head

This comment has been minimized.

Copy link
@cclauss

cclauss Mar 25, 2020

Member

Python naming uses snake_case so cur_node

@stale
Copy link

stale bot commented May 2, 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 May 2, 2020
used snake_case instead of camel case
@stale stale bot removed the wontfix label May 2, 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.