数据结构
Hyotei
这个作者很懒,什么都没留下…
展开
-
数据结构(Python)-单循环链表实现
# coding=utf-8import randomrandom.seed(1)class Node(): def __init__(self, x, next=None): self.val = x self.next = next# 循环链表class Circular_linked_list(): # 带头节点循环链表的创建 def create(self, ...原创 2018-06-23 15:48:38 · 521 阅读 · 0 评论 -
数据结构(Python)-单链表实现
# coding=utf-8import randomrandom.seed(1)# 创建单链表节点class ListNode(): def __init__(self, x, next=None): # data表示链表的数据域,next表示链表的指针域 self.data = x self.next = nextclass ListNode_op(): # 创...原创 2018-06-22 17:21:14 · 185 阅读 · 0 评论 -
数据结构(Python)-双向链表
# coding=utf-8import randomrandom.seed(1)class Node(): def __init__(self, x, prior=None, next=None): self.val = x self.prior = prior self.next = nextclass Double_linked_list(): # 创建双向链表...原创 2018-06-23 20:17:28 · 215 阅读 · 0 评论