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

查看全文
  • 相关阅读:
    关于Python中的yield
    Python的getattr(),setattr(),delattr(),hasattr()
    django Forgienkey字段 在前台用js做处理
    利用checkbox的到值,并且存到数据库修改的话要显示之前选择的
    关于django批量上传图片
    block extends include三者的差别跟用法
    全智能建造
    共享经济
    新工匠
    运营方案
  • 原文地址:https://www.cnblogs.com/ldxsuanfa/p/10931019.html
  • Copyright © 2011-2022 走看看