当前位置:网站首页>Leetcode-83 delete duplicate elements in the sorting linked list
Leetcode-83 delete duplicate elements in the sorting linked list
2022-07-01 18:47:00 【It was the sea】

class Solution(object):
def deleteDuplicates(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head : return
cur = head
while cur.next:
if cur.val == cur.next.val:
cur.next = cur.next.next
else:
cur = cur.next
return head
边栏推荐
- R语言使用epiDisplay包的followup.plot函数可视化多个ID(病例)监测指标的纵向随访图、使用n.of.lines参数指定显示的病例数
- Implement a Prometheus exporter
- [noip2015] jumping stone
- Salesmartly has some tricks for Facebook chat!
- Blue Bridge Cup real problem: word analysis
- Computer network interview assault
- 字节跳动数据平台技术揭秘:基于 ClickHouse 的复杂查询实现与优化
- On the language internationalization of Yongzhong Office
- 隐私沙盒终于要来了
- Privacy sandbox is finally coming
猜你喜欢

因子分析怎么计算权重?

How does factor analysis calculate weights?

What impact will multinational encryption regulation bring to the market in 2022

Privacy sandbox is finally coming

Leetcode-128 最长连续序列

Bernoulli distribution (a discrete distribution)
![[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush](/img/c0/25c1b96cc56fbd0231d32214d66718.jpg)
[source code analysis] model parallel distributed training Megatron (5) -- pipestream flush

1380. Lucky number in matrix / 1672 Total assets of the richest customers

6款红黄黑榜摄像头评测:谁最安全?谁画质好?从此让你不再踩雷

Cloud computing - make learning easier
随机推荐
After studying 11 kinds of real-time chat software, I found that they all have these functions
[noip2015] jumping stone
Three.js学习-相机Camera的基本操作(了解向)
Technology implementation and Architecture Practice
Highly reliable program storage and startup control system based on anti fuse FPGA and QSPI flash
The 13th simulation problem of the single chip microcomputer provincial competition of the Blue Bridge Cup
字节跳动数据平台技术揭秘:基于 ClickHouse 的复杂查询实现与优化
主成分计算权重
解决方案:可以ping别人,但是别人不能ping我
记一次 .NET 差旅管理后台 CPU 爆高分析
Is the fund of futures account safe? How to open an account?
ACM MM 2022视频理解挑战赛视频分类赛道冠军AutoX团队技术分享
Lumiprobe lumizol RNA extraction reagent solution
Search 2D matrix 2
Navicat Premium 15 永久破解和2021版本最新IDEA破解(亲测有效)
Data query language (DQL)
期货账户的资金安全吗?怎么开户?
PMP daily three questions (February 15, 2022)
Blue Bridge Cup real question: score statistics
Principal component calculation weight