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

Lists里setdata()是不是有问题? #14

Open
SmartLi8 opened this issue Apr 12, 2019 · 2 comments
Open

Lists里setdata()是不是有问题? #14

SmartLi8 opened this issue Apr 12, 2019 · 2 comments

Comments

@SmartLi8
Copy link

应该是self.data = newdata。而不是self.next = newdata。

@hawkli-1994
Copy link

add方法感觉也是错的

@Ohikuy
Copy link

Ohikuy commented Sep 10, 2020

如果使用self.data = newdata 那么就Node就变成了一个单独的节点,就不是链表了。
写成self.next = newdata也是错误的

这就是一个Node节点的实现,称作是linked list是错误的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants