单链表反转
摘要:
#!/usr/bin/python#递归实现单链表反转 class ListNode(object): def __init__(self,x): self.val=x self.next=None def recurse(head,newhead): #递归,head为原链表的头结点,newhea 阅读全文
posted @ 2019-02-28 23:19 ExplorerMan 阅读(110) 评论(0) 推荐(0)
posted @ 2019-02-28 23:19 ExplorerMan 阅读(110) 评论(0) 推荐(0)
posted @ 2019-02-28 23:19 ExplorerMan 阅读(350) 评论(0) 推荐(0)
posted @ 2019-02-28 23:17 ExplorerMan 阅读(223) 评论(0) 推荐(0)
posted @ 2019-02-28 22:27 ExplorerMan 阅读(220) 评论(0) 推荐(0)