当前位置:网站首页>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
边栏推荐
- Setting up a time server requires the client to automatically synchronize the time of the server at 9 a.m. every day
- 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
- MES production equipment manufacturing execution system software
- Talk about the favorite tools used by project managers
- 1380. Lucky number in matrix / 1672 Total assets of the richest customers
- Using OpenSSL encryption to rebound shell traffic
- Relationship between sensor size, pixel, dpi resolution, inch and millimeter
- [source code analysis] NVIDIA hugectr, GPU version parameter server - (1)
- Extract the compressed package file and retrieve the password
猜你喜欢
![[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)](/img/92/f3a70e7086aeedf41eea3eef98b5aa.jpg)
[source code analysis] NVIDIA hugectr, GPU version parameter server - (1)

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

Relational database management system of easyclick

Data query language (DQL)

From comedians to NBA Zhan Huang, check the encrypted advertisements during this super bowl

Classpath classpath

Mysql database of easyclick

Extract the compressed package file and retrieve the password
![[PHP foundation] realize the connection between PHP and SQL database](/img/eb/c8953eddfe3b19b0adb5529957d275.jpg)
[PHP foundation] realize the connection between PHP and SQL database

Using OpenSSL encryption to rebound shell traffic
随机推荐
(6) VIM editor MV cat redirection standard input and output more pipe symbols head tail
Database - MySQL advanced SQL statement (I)
540. Single element in ordered array / 1684 Count the number of consistent strings
. Net cloud native architect training camp (permission system code implements actionaccess) -- learning notes
. Net cloud native architect training camp (permission system code implements actionaccess) -- learning notes
D. Yet Another Minimization Problem
开发那些事儿:EasyCVR平台添加播放地址鉴权
This is the latest opportunity of the London bank trend
Operation of cmake under win
Nielseniq found that 60% of the re launched products had poor returns
Cloud computing - make learning easier
Opencv map reading test -- error resolution
When the fixed frequency artifact falls in love with multithreading | ros2 fixed frequency topic release demo
SPIE Western optoelectronics exhibition returned offline and successfully held a science and engineering event
Is Alipay wallet convenient to use?
Highly reliable program storage and startup control system based on anti fuse FPGA and QSPI flash
Blackwich: the roadmap of decarbonization is the first step to realize the equitable energy transformation in Asia
Redis主从实现10秒检查与恢复
Mujoco model learning record
What impact will multinational encryption regulation bring to the market in 2022