# -*- coding:utf-8 -*-
class Solution:
def ReverseList(self, pHead):
if pHead is None:
return
last=None
while pHead is not None:
tmp=pHead.next
pHead.next=last
last=pHead
pHead=tmp
return last
手机扫一扫
移动阅读更方便
你可能感兴趣的文章