当前位置:网站首页>Leetcode-83 删除排序链表中重复的元素
Leetcode-83 删除排序链表中重复的元素
2022-07-01 18:33:00 【原来是大海】

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
边栏推荐
- Happy new year | 202112 monthly summary
- 必看,时间序列分析
- Calculation of intersection of two line segments
- Highly reliable program storage and startup control system based on anti fuse FPGA and QSPI flash
- 开发那些事儿:EasyCVR平台添加播放地址鉴权
- 证券开户安全么,有没有什么样的危险呢
- Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application
- Set the style of QT property sheet control
- 12. Design of power divider for ads usage record
- Quick foundation of group theory (5): generators, Kelley graphs, orbits, cyclic graphs, and "dimensions" of groups?
猜你喜欢

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

Oracle TRUNC function processing date format

Unity learning fourth week

540. Single element in ordered array

Depth first search - DFS (burst search)

Setting up a time server requires the client to automatically synchronize the time of the server at 9 a.m. every day

Mujoco XML modeling

Record 3 - the state machine realizes key control and measures the number of external pulses

12种数据量纲化处理方式

How to manage 1000 anchors by one person?
随机推荐
How to find the optimal learning rate
js如何将带有分割符的字符串转化成一个n维数组
Leetcode problem solving series -- continuous positive sequence with sum as s (sliding window)
Quick foundation of group theory (5): generators, Kelley graphs, orbits, cyclic graphs, and "dimensions" of groups?
Leetcode 1380. Lucky numbers in the matrix (save the minimum number of each row and the maximum number of each column)
Android development interview was badly hit in 3 years, and now the recruitment technical requirements are so high?
12种数据量纲化处理方式
证券开户安全么,有没有什么样的危险呢
網上股票開戶安全嗎?是否可靠?
golang中的select详解
Force buckle day33
Equipment simulation and deduction training system software
Terms related to K line
Relational database management system of easyclick
Mujoco's biped robot Darwin model
Detailed explanation of select in golang
2022 Heilongjiang latest fire protection facility operator simulation test question bank and answers
Depth first search - DFS (burst search)
Definition of rotation axis in mujoco
Highly reliable program storage and startup control system based on anti fuse FPGA and QSPI flash