当前位置:网站首页>LeetCode 237. Delete nodes in the linked list
LeetCode 237. Delete nodes in the linked list
2022-07-05 03:00:00 【Abby's daily life】
https://leetcode-cn.com/problems/delete-node-in-a-linked-list/
Ideas
- Not really deleted , Instead, update the value of the node to be deleted to the value of the next node
- Delete the node next Updated to .next.next
public void deleteNode(ListNode node) {
node.val = node.next.val;
node.next = node.next.next;
}
边栏推荐
- Design and implementation of campus epidemic prevention and control system based on SSM
- 2. Common request methods
- Linux Installation redis
- Zabbix
- The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
- 看 TDengine 社区英雄线上发布会,听 TD Hero 聊开发者传奇故事
- Problem solving: attributeerror: 'nonetype' object has no attribute 'append‘
- 为什么腾讯阿里等互联网大厂诞生的好产品越来越少?
- Simple use of devtools
- Tencent cloud, realize image upload
猜你喜欢
随机推荐
Pytest (5) - assertion
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
ELK日志分析系统
College Students' innovation project management system
[Yu Yue education] National Open University autumn 2018 8109-22t (1) monetary and banking reference questions
this+闭包+作用域 面试题
Zabbix
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
单项框 复选框
Sqoop安装
Breaking the information cocoon - my method of actively obtaining information - 3
The perfect car for successful people: BMW X7! Superior performance, excellent comfort and safety
Kbp206-asemi rectifier bridge kbp206
2. Common request methods
Hot knowledge of multithreading (I): introduction to ThreadLocal and underlying principles
el-select,el-option下拉选择框
Linux Installation redis
Pat class a 1162 postfix expression
VM in-depth learning (XXV) -class file overview
【LeetCode】98. Verify the binary search tree (2 brushes of wrong questions)