当前位置:网站首页>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
边栏推荐
- The latest software scheme of the intelligent information management system of the armed police force
- Highly reliable program storage and startup control system based on anti fuse FPGA and QSPI flash
- Xia CaoJun ffmpeg 4.3 audio and video foundation to engineering application
- SPIE Western optoelectronics exhibition returned offline and successfully held a science and engineering event
- How to find customers for investment attraction in industrial parks
- Nearly 60% of the employees strongly support Ctrip's "3+2" working mode, and work at home for two days a week
- Depth first search - DFS (burst search)
- Sum of three numbers
- Rust language - cargo, crates io
- Happy new year | 202112 monthly summary
猜你喜欢
随机推荐
C operator overloads the query table
Fresh, 2022 advanced Android interview must know 100 questions (interview questions + answer analysis)
Pytorch crossentropyloss learning
Highly reliable program storage and startup control system based on anti fuse FPGA and QSPI flash
Fix the problem that easycvr device video cannot be played
Relationship between sensor size, pixel, dpi resolution, inch and millimeter
The ultimate version of the 13th simulation of the single chip microcomputer provincial competition of the Blue Bridge Cup
因子分析怎么计算权重?
GAMES202作业0-环境搭建过程&解决遇到的问题
Using OpenSSL encryption to rebound shell traffic
Slider verification code identification gadget display
網上股票開戶安全嗎?是否可靠?
Operating system interview assault
Mujoco's biped robot Darwin model
主成分计算权重
To improve the efficiency of office collaboration, trackup may be the best choice
Set the style of QT property sheet control
On the language internationalization of Yongzhong Office
Setting up a time server requires the client to automatically synchronize the time of the server at 9 a.m. every day
Introduction to easyclick database