当前位置:网站首页>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
边栏推荐
- What impact will multinational encryption regulation bring to the market in 2022
- Search 2D matrix 2
- SCP -i private key usage
- . Net cloud native architect training camp (permission system code implements actionaccess) -- learning notes
- The method of real-time tracking the current price of London Silver
- Is online stock account opening safe? Is it reliable?
- Set the style of QT property sheet control
- Mysql database of easyclick
- Common design parameters of solid rocket motor
- The latest intelligent factory MES management system software solution
猜你喜欢

Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application

Fix the black screen caused by iPhone system failure

12. Design of power divider for ads usage record

PTA year of birth

540. Single element in ordered array / 1684 Count the number of consistent strings

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

必看,时间序列分析

Domestic spot silver should be understood

Force buckle day33

Debiasing word embeddings | talking about word embedding and deviation removal # yyds dry goods inventory #
随机推荐
D. Yet Another Minimization Problem
Vue uses keep alive to cache page optimization projects
必看,时间序列分析
聊聊项目经理最爱使用的工具
Five degrees easy chain enterprise app is newly upgraded
[acnoi2022] color ball
Financial judgment questions
Apache iceberg source code analysis: schema evolution
[image denoising] matlab code for removing salt and pepper noise based on fast and effective multistage selective convolution filter
[CF1476F]Lanterns
MySQL connection tools
Slider verification code identification gadget display
How to find customers for investment attraction in industrial parks
Talk about the favorite tools used by project managers
Static timing analysis (STA) in ic/fpga design
Definition of rotation axis in mujoco
[2. Basics of Delphi grammar] 4 Object Pascal operators and expressions
SPIE Western optoelectronics exhibition returned offline and successfully held a science and engineering event
因子分析怎么计算权重?
A wonderful time to buy and sell stocks