当前位置:网站首页>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
边栏推荐
- Five degrees easy chain enterprise app is newly upgraded
- Search 2D matrix 2
- 隐私沙盒终于要来了
- [CF559E]Gerald and Path
- Lumiprobe biomolecular quantification - qudye Protein Quantification Kit
- Mise en place d'une plate - forme générale de surveillance et d'alarme, quelles sont les conceptions nécessaires dans l'architecture?
- How to find customers for investment attraction in industrial parks
- Memo - about C # generating barcode
- 为什么独立站卖家都开始做社交媒体营销?原来客户转化率能提高这么多!
- 必看,时间序列分析
猜你喜欢
Lumiprobe 生物分子定量丨QuDye 蛋白定量试剂盒
Memo - about C # generating barcode
研究了11种实时聊天软件,我发现都具备这些功能…
ACM MM 2022视频理解挑战赛视频分类赛道冠军AutoX团队技术分享
After studying 11 kinds of real-time chat software, I found that they all have these functions
实现一个Prometheus exporter
About enterprise middle office planning and it architecture microservice transformation
Static timing analysis (STA) in ic/fpga design
PCL learning materials
Operation of cmake under win
随机推荐
Find all missing numbers in the array
R语言ggplot2可视化:可视化折线图、使用labs函数为折线图添加自定义的Y轴标签信息(customize y axis label)
Technology implementation and Architecture Practice
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush
A database editing gadget that can edit SQLite database. SQLite database replaces fields. SQL replaces all values of a field in the database
字节跳动数据平台技术揭秘:基于 ClickHouse 的复杂查询实现与优化
Is the fund of futures account safe? How to open an account?
LeetCode 148. Sort linked list
GameFramework食用指南
Lumiprobe bifunctional crosslinker sulfo cyanine 5 bis NHS ester
Halcon图片标定,使得后续图片处理过后变成与模板图片一样
NSI packaging script add file details
因子分析怎么计算权重?
R语言ggplot2可视化:gganimate创建动态柱状图动画(gif)、在动画中沿给定维度逐步显示柱状图、enter_grow函数和enter_fade函数控制运动内插退出(渐变tweening)
R language uses the transmute function of dplyr package to calculate the moving window mean value of the specified data column in dataframe data, and uses ggplot2 package to visualize the line graph b
OpenAI|视频预训练 (VPT):基于观看未标记的在线视频的行动学习
Case study on comprehensive competitiveness of principal components
如何在自有APP内实现小程序实现连麦直播
How to operate technology related we media well?
Popular science: what does it mean to enter the kernel state?