zoukankan      html  css  js  c++  java
  • 【剑指offer】Q16:翻转链表

    def reverse(head):
    	if head == None or head.next == None:
    		return head
    	psuhead = ListNode(-1)
    	while head:
    		nexthead = head.next
    		head.next = psuhead.next
    		psuhead.next = head
    		head = nexthead
    	head = psuhead.next
    	del psuhead
    	return head

查看全文
  • 相关阅读:
    hdu 3496
    poj 2374
    zoj 3399
    poj 1321
    sgu 365
    hdu 3555
    poj 3345
    poj 2355
    Android重命名文件
    在workflow中传值的sample
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10931019.html
  • Copyright © 2011-2022 走看看