# Definition for singly-linked list.
# class ListNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution(object):
    def reverseList(self, head):
        if(head==None):return None
        if(head.next==None):return head
       
        # pre=head
        # p=head.next
        # pre.next=None
        # nxt=None
        new_head=None
        while head:
            p=head
            head=head.next
            p.next=new_head
            new_head=p
        return new_head

最新文章

  1. Java:单例模式的七种写法
  2. SpringMVC学习(二)
  3. Linux第14周学习笔记
  4. TOMOYO Linux(undone)
  5. 从零开始学习jQuery (九) jQuery工具函数
  6. 关于git status
  7. Android APP开发需求文档范本
  8. 在域信任环境中使用 Team Foundation Server (TFS 2013)
  9. echarts分组插件echarts.group代码分享
  10. 译-Web Service剖析: XML, SOAP 和WSDL 用于独立于平台的数据交换
  11. Halcon的应用程序 打开后 弹出没有帮助文件错误提示
  12. 在macos上基于python2.7安装PyQt5
  13. qt deleterLater
  14. 四、View的工作原理
  15. 思路 一般创建展示类时候 例如page类 会在网页上新增多个对应字段的隐藏域 用于存储值
  16. Dapper Helper
  17. ICM Technex 2018 and Codeforces Round #463 (Div. 1 + Div. 2, combined) A
  18. nodejs--路径问题
  19. jquery写tab切换,三行代码搞定
  20. IIS中发布后出现Could not load file or assembly'System.Data.SQLite.dll' or one of its depedencies

热门文章

  1. Unable to find the wrapper "https"错误的解决办法
  2. JSP-08-第三方控件的使用
  3. zw版【转发·台湾nvp系列Delphi例程】HALCON DivImage2
  4. 二招解决php乱码问题
  5. Python for z/OS
  6. 【python cookbook】【字符串与文本】15.给字符串中的变量名做插值处理
  7. Linux Runtime PM介绍【转】
  8. Linux设备驱动之semaphore机制【转】
  9. java网络编程之TCP通讯
  10. linux打开文件数量的查看方法