当前位置:网站首页>Leetcode-141 circular linked list
Leetcode-141 circular linked list
2022-07-01 18:47:00 【It was the sea】
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
- On the language internationalization of Yongzhong Office
- Operation of cmake under win
- Leetcode-128 最长连续序列
- Weekly recommended short videos: be alert to the confusion between "phenomena" and "problems"
- Localization through custom services in the shuttle application
- [Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University
- Draw drawing process of UI drawing process
- Go Technology Daily (2022-02-14) - go language slice interview real questions 8 consecutive questions
- C language learning notes: type definition typedef and declaration external CSDN creation punch in
猜你喜欢
Database - MySQL advanced SQL statement (I)
Cloud computing - make learning easier
Memo - about C # generating barcode
斯坦福、Salesforce|MaskViT:蒙面视觉预训练用于视频预测
Image acquisition and playback of coaxpress high speed camera based on pxie interface
Computer network interview assault
C# SelfHost WebAPI (2)
Unity learning fourth week
Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application
Principal component calculation weight
随机推荐
Write an open source, convenient and fast database document query and generation tool with WPF
NSI packaging script add file details
What designs are needed in the architecture to build a general monitoring and alarm platform
Operation of cmake under win
搭建一個通用監控告警平臺,架構上需要有哪些設計
Find all missing numbers in the array
How to manage 1000 anchors by one person?
Sanfeng cloud 0215 I often use
Bernoulli distribution (a discrete distribution)
Memo - about C # generating barcode
主成分计算权重
研究了11种实时聊天软件,我发现都具备这些功能…
Lumiprobe 双功能交联剂丨Sulfo-Cyanine5 双-NHS 酯
R语言caTools包进行数据划分、scale函数进行数据缩放、class包的knn函数构建K近邻分类器、table函数计算混淆矩阵
On the language internationalization of Yongzhong Office
Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application
Principal component calculation weight
如何在自有APP内实现小程序实现连麦直播
Regular expression
About enterprise middle office planning and it architecture microservice transformation