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

while判断条件失效的求助 #5

Open
h03147 opened this issue Apr 8, 2021 · 0 comments
Open

while判断条件失效的求助 #5

h03147 opened this issue Apr 8, 2021 · 0 comments
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@h03147
Copy link
Owner

h03147 commented Apr 8, 2021

目录下 简单题 链表 GetIntersectionNode160 (leetcode第160题) 里面判断条件
while(L1 != L2)
L1 = L2的相等条件应该是当遍历到1这个节点的时候循环就结束了返回 1的节点地址
而本题无论两个链表节点值为什么,第一次相等都不会停止,而是都遍历到结尾为null时,L1才等于L2结束
这样显然不对
在此请求各位大佬们的帮助,欢迎提出修改意见,十分感谢!

@h03147 h03147 added bug Something isn't working help wanted Extra attention is needed labels Apr 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant