当前位置:网站首页>Leetcode-141环形链表
Leetcode-141环形链表
2022-07-01 18:33:00 【原来是大海】
class Solution(object):
def hasCycle(self, head):
"""
:type head: ListNode
:rtype: bool
"""
cur = head
res = set()
while cur:
node = cur
if node not in res:
cur = cur.next
res.add(node)
else:
return True
return False
边栏推荐
- [source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
- 开发那些事儿:EasyCVR平台添加播放地址鉴权
- Relational database management system of easyclick
- MySQL connection tools
- EasyCVR设备录像出现无法播放现象的问题修复
- Implementation of converting PCM file to WAV
- Debiasing word embeddings | talking about word embedding and deviation removal # yyds dry goods inventory #
- Batch export all pictures in PPT in one second
- Using OpenSSL encryption to rebound shell traffic
- The latest software scheme of the intelligent information management system of the armed police force
猜你喜欢
因子分析怎么计算权重?
Fix the black screen caused by iPhone system failure
Android development interview was badly hit in 3 years, and now the recruitment technical requirements are so high?
This is the latest opportunity of the London bank trend
Setting up a time server requires the client to automatically synchronize the time of the server at 9 a.m. every day
关于企业中台规划和 IT 架构微服务转型
Penetration practice vulnhub range Tornado
Mysql database of easyclick
Mujoco XML modeling
主成分之综合竞争力案例分析
随机推荐
MES production equipment manufacturing execution system software
Quick foundation of group theory (5): generators, Kelley graphs, orbits, cyclic graphs, and "dimensions" of groups?
Talk about the favorite tools used by project managers
JS how to convert a string with a delimiter into an n-dimensional array
(6) VIM editor MV cat redirection standard input and output more pipe symbols head tail
Convert the robot's URDF file to mujoco model
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
Penetration practice vulnhub range Tornado
Setting up a time server requires the client to automatically synchronize the time of the server at 9 a.m. every day
Single element of an ordered array
Search 2D matrix 2
Data query language (DQL)
Detailed explanation of ArrayList expansion
2022 Heilongjiang latest fire protection facility operator simulation test question bank and answers
Using OpenSSL encryption to rebound shell traffic
golang中的select详解
Fresh, 2022 advanced Android interview must know 100 questions (interview questions + answer analysis)
Vue uses keep alive to cache page optimization projects
Implementation of converting PCM file to WAV
D. Yet Another Minimization Problem