标签:lis sel code bottom node reverse == utf-8 turn
# -*- coding:utf-8 -*-
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
# 返回ListNode
def ReverseList(self, pHead):
# write code here
if pHead==None:
return None
a=pHead
b=pHead.next
a.next=None
while b :
c=b.next
b.next=a
a=b
b=c
return a
标签:lis sel code bottom node reverse == utf-8 turn
原文地址:https://www.cnblogs.com/hit-joseph/p/9523224.html