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

查看全文
  • 相关阅读:
    一些常用的代码规范
    策略模式学习,使用go实现策略模式
    数据库作业3:第二章课后题
    数据库作业4:SQL练习1
    对数据库相关的概念自己的理解
    SQL server的初步使用
    对于高德地图SDK的开发使用
    滑稽(好像会动)!
    羊车门作业
    对Python课的看法
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10931019.html
  • Copyright © 2011-2022 走看看