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

 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. 在mac中导入hadoop2.6.0源代码至eclipse 分类: A1_HADOOP 2015-04-12 09:27 342人阅读 评论(0) 收藏

    一.环境准备 1.安装jdk.maven等 2.下载hadoop源代码,并解压 3.将tools.jar复制到Classes中,具体原因见http://wiki.apache.org/hadoop/H ...

  2. js进阶课程 12-9 jquery的事件对象event的方法有哪些?

    js进阶课程 12-9 jquery的事件对象event的方法有哪些? 一.总结 一句话总结:三组六个,阻止默认事件一组,阻止冒泡一组,阻止冒泡和剩余事件一组. 1.事件的默认动作指什么? 比如点a标 ...

  3. ZOJ 1914 Arctic Network (POJ 2349 UVA 10369) MST

    ZOJhttp://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=1914 POJhttp://poj.org/problem?id=23 ...

  4. 在此页上的 ActiveX 控件和本页上的其它部份的交互可能不安全

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息http://xqy266.blogbus.com/logs/66258230.html 在EOS6的项目中,如果采用VC++开发的Active ...

  5. C++利用SOAP开发WebService

    // soapconsole.cpp : Defines the entry point for the console application.// #include "stdafx.h& ...

  6. [Angular2 Router] Guard: CanLoad

    'canLoad' guard can decide whether a lazy load module can be loaded or not. @Injectable() export cla ...

  7. 【翻译自mos文章】Clusterware间歇性的hang,命令报CRS-184而且Network Socket Files in /tmp/.oracle or /var/tmp/.oracle被删

    来源于: Clusterware Intermittently Hangs And Commands Fail With CRS-184 as Network Socker Files in /tmp ...

  8. Windows共享上网的做法

    作者:朱金灿 来源:http://blog.csdn.net/clever101 现在有这样一个网络应用场景:A机器是一个PC台式机,处在两个网络中,一个是处在192.168.30.1到192.168 ...

  9. Oracle 12C R2 on Linux 7.X 单实例静默安装文档

    禁用防火墙systemctl stop firewalld.servicesystemctl disable firewalld.service 禁用SELinuxcat /etc/selinux/c ...

  10. WP8.1开发:后台任务详解(求推荐)

    小梦今天给大家分享一下windows phone 8.1中的后台任务如何实现,许多应用都会用到后台任务,所以我们必须得掌握. 新建后台任务类: 首先我们先新建一个windows phone 8.1空白 ...