如题 删除是要注意让现在的链表等于下一个链表的值

 class Solution {
public:
void deleteNode(ListNode* node) {
ListNode *nextnode = node ->next;
*node = *nextnode;
node->next = nextnode ->next;
delete nextnode;
}
};

Leetcode 237 Delete Node in a Linked List 链表的更多相关文章

  1. [LeetCode] 237. Delete Node in a Linked List 解题思路

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  2. LeetCode 237. Delete Node in a Linked List (在链表中删除一个点)

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  3. [LeetCode] 237. Delete Node in a Linked List 删除链表的节点

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  4. (easy)LeetCode 237.Delete Node in a Linked List

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  5. leetcode 237 Delete Node in a Linked List python

    题目: Write a function to delete a node (except the tail) in a singly linked list, given only access t ...

  6. 17.leetcode 237. Delete Node in a Linked List

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  7. [Leetcode]237. Delete Node in a Linked List -David_Lin

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  8. LeetCode 237. Delete Node in a Linked List 删除链表结点(只给定要删除的结点) C++/Java

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

  9. [LeetCode] 237. Delete Node in a Linked List_Easy tag: Linked List

    Write a function to delete a node (except the tail) in a singly linked list, given only access to th ...

随机推荐

  1. 部分城市关于.Net招聘数量

    2016-12-09更新统计数据 上海 10730 北京 6322 广州 4157 深圳 3548 成都 2291 重庆 706 厦门 285 2015-01-30日,前程无忧搜索".Net ...

  2. CComboBox自动匹配

    void CLoadPhotoDlg::OnCbnEditchangeCombo1() {  // TODO: 在此添加控件通知处理程序代码  UpdateData(TRUE);  CComboBox ...

  3. [Node] Using dotenv to config env variables

    Install: npm install dotenv --save For example, we can store the sensitive information or env relate ...

  4. python爬虫(一)抓取 色影无忌图片

    原文地址: http://www.30daydo.com/article/56 由于平时爱好摄影.所以喜欢看看色影无忌论坛的获奖摄影作品,所以写了个小script用来抓取上面的获奖图片,亲自測试能够使 ...

  5. 用live555将内网摄像机视频推送到外网server,附源代码

    近期非常多人问,怎样将内网的摄像机流媒体数据公布到公网,假设用公网与局域网间的port映射方式太过麻烦,一个摄像机要做一组映射,并且不是每个局域网都是有固定ip地址,即使外网主机配置好了每个摄像机的映 ...

  6. XML输出到浏览器报错

    在使用Firefox浏览器测试我编写的xml文件时,遇到如下错误:我的xml源代码如下: <?xml version="1.0" encoding="UTF-8&q ...

  7. http各种状态码具体解释

    1XX (暂时响应)   100(继续) 请求者应当继续提出请求.   101(切换协议)请求者已要求server切换协议,server已确认并准备切换 2XX(成功)    ·200(成功) ser ...

  8. 【30.23%】【codeforces 552C】Vanya and Scales

    time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard ou ...

  9. winfrom RichTextBox每行字体的颜色

    public static void AppendTextColorful(this RichTextBox rtBox, string text, Color color, bool addNewL ...

  10. Redis+Mysql模式和内存+硬盘模式的异同

    http://www.open-open.com/lib/view/open1346029825942.html 学习任何新知识,都是一个循序渐进的过程,从刚开始的懵懂无知,到简单熟悉,然后突然的彻悟 ...