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

10.2-4 need to consider x equals to L.nil #461

Open
funny1dog opened this issue Nov 17, 2022 · 0 comments
Open

10.2-4 need to consider x equals to L.nil #461

funny1dog opened this issue Nov 17, 2022 · 0 comments

Comments

@funny1dog
Copy link

The last line of code:
return x
which is not considered if x == L.nil, and then it returns L.nil with L.nil.key = k, and how does the return value differentiate it from the normally found elements?

So we need to check if x == L.nil and if it is then set L.nil.key = NIL to solve the issue.

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

1 participant