当前位置:网站首页>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
边栏推荐
- [noip2015] jumping stone
- EasyCVR通过国标GB28181协议接入设备,出现设备自动拉流是什么原因?
- At present, where is the most formal and safe account opening for futures speculation? How to open a futures account?
- [image denoising] matlab code for removing salt and pepper noise based on fast and effective multistage selective convolution filter
- C# SelfHost WebAPI (2)
- Glidefast consulting was selected as the elite partner of servicenow in 2022
- Slider verification code identification gadget display
- Blackwich: the roadmap of decarbonization is the first step to realize the equitable energy transformation in Asia
- Definition of rotation axis in mujoco
- Leetcode problem solving series -- continuous positive sequence with sum as s (sliding window)
猜你喜欢

PTA year of birth

Android development interview was badly hit in 3 years, and now the recruitment technical requirements are so high?

Data query language (DQL)

Samba basic usage

Apache iceberg source code analysis: schema evolution

. Net cloud native architect training camp (permission system code implements actionaccess) -- learning notes

A wonderful time to buy and sell stocks

12. Design of power divider for ads usage record

Sum of three numbers

t10_ Adapting to Market Participantsand Conditions
随机推荐
必看,时间序列分析
網上股票開戶安全嗎?是否可靠?
Mysql database of easyclick
Operating system interview assault
[PHP foundation] realize the connection between PHP and SQL database
Calculation of intersection of two line segments
Terms related to K line
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
Batch export all pictures in PPT in one second
[2. Basics of Delphi grammar] 4 Object Pascal operators and expressions
MySQL + JSON = King fried
Is it safe to open a securities account? Is there any danger
Samba basic usage
Draw drawing process of UI drawing process
ZABBIX alarm execute remote command
Nearly 60% of the employees strongly support Ctrip's "3+2" working mode, and work at home for two days a week
主成分之综合竞争力案例分析
EasyCVR通过国标GB28181协议接入设备,出现设备自动拉流是什么原因?
Basic concepts of binary tree
D. Yet Another Minimization Problem