当前位置:网站首页>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
边栏推荐
- What designs are needed in the architecture to build a general monitoring and alarm platform
- LiveData postValue会“丢”数据
- 1380. Lucky number in matrix / 1672 Total assets of the richest customers
- Navicat premium 15 permanent cracking and 2021 latest idea cracking (valid for personal testing)
- 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
- code
- Popular science: what does it mean to enter the kernel state?
- Classpath classpath
- golang 错误处理
- 每周推荐短视频:警惕“现象”与“问题”相互混淆
猜你喜欢
t10_ Adapting to Market Participantsand Conditions
Implement a Prometheus exporter
宏观视角看抖音全生态
What impact will multinational encryption regulation bring to the market in 2022
OpenAI|视频预训练 (VPT):基于观看未标记的在线视频的行动学习
A wonderful time to buy and sell stocks
Find all missing numbers in the array
Mise en place d'une plate - forme générale de surveillance et d'alarme, quelles sont les conceptions nécessaires dans l'architecture?
After studying 11 kinds of real-time chat software, I found that they all have these functions
Force buckle day33
随机推荐
C language learning notes: type definition typedef and declaration external CSDN creation punch in
Privacy sandbox is finally coming
How to find the optimal learning rate
[Chongqing Guangdong education] basic psychology reference materials of Tianjin Normal University
PMP daily three questions (February 15, 2022)
宏观视角看抖音全生态
Lumiprobe Lumizol RNA 提取试剂解决方案
Lumiprobe lumizol RNA extraction reagent solution
6款红黄黑榜摄像头评测:谁最安全?谁画质好?从此让你不再踩雷
解决方案:可以ping别人,但是别人不能ping我
How to operate technology related we media well?
主成分计算权重
Image acquisition and playback of coaxpress high speed camera based on pxie interface
LeetCode 148. Sort linked list
Livedata postvalue will "lose" data
力扣每日一题-第32天-1232. 缀点成线
Opencv map reading test -- error resolution
R语言caTools包进行数据划分、scale函数进行数据缩放、class包的knn函数构建K近邻分类器、table函数计算混淆矩阵
Write an open source, convenient and fast database document query and generation tool with WPF
Mysql database of easyclick