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

链表中环的入口节点 #105

Open
AwesomeDevin opened this issue Sep 26, 2023 · 0 comments
Open

链表中环的入口节点 #105

AwesomeDevin opened this issue Sep 26, 2023 · 0 comments

Comments

@AwesomeDevin
Copy link
Owner

AwesomeDevin commented Sep 26, 2023

给定一个链表,若其中包含环,请找出该链表的环的入口节点,否则,输出null。

解析:
基于hashmap进行标记,如果标记过了,则为入口节点,如果遍历到最后仍没有出现过标记过的,输出null

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