当前位置:网站首页>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
边栏推荐
- [CF559E]Gerald and Path
- [PHP foundation] realize the connection between PHP and SQL database
- Android development interview was badly hit in 3 years, and now the recruitment technical requirements are so high?
- Easycvr accesses the equipment through the national standard gb28181 protocol. What is the reason for the automatic streaming of the equipment?
- Review Net 20th anniversary development and 51aspx growth
- [source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
- 开发那些事儿:EasyCVR平台添加播放地址鉴权
- Glidefast consulting was selected as the elite partner of servicenow in 2022
- Implementation of converting PCM file to WAV
- golang中的select详解
猜你喜欢

540. Single element in ordered array

Growing up in the competition -- (Guangyou's most handsome cub) Pikachu walking

因子分析怎么计算权重?

关于企业中台规划和 IT 架构微服务转型

Mujoco XML modeling

12种数据量纲化处理方式

2022 Heilongjiang latest fire protection facility operator simulation test question bank and answers

Check log4j problems using stain analysis

Cloud picture says | distributed transaction management DTM: the little helper behind "buy buy buy"

Localization through custom services in the shuttle application
随机推荐
Search 2D matrix 2
Classpath classpath
网上股票开户安全吗?是否可靠?
Operation of cmake under win
Leetcode 1380. Lucky numbers in the matrix (save the minimum number of each row and the maximum number of each column)
必看,时间序列分析
Detailed explanation of select in golang
Roll out! Enlightenment!
Basic concepts of binary tree
Apk signature process introduction [easy to understand]
Relationship between sensor size, pixel, dpi resolution, inch and millimeter
Penetration practice vulnhub range Tornado
Samba basic usage
MES production equipment manufacturing execution system software
Relational database management system of easyclick
What are the six steps of the software development process? How to draw software development flow chart?
js如何将带有分割符的字符串转化成一个n维数组
To improve the efficiency of office collaboration, trackup may be the best choice
Computer network interview assault
Blue Bridge Cup real question: score statistics