摘要:
1 class Node: 2 """双向链表节点""" 3 def __init__(self,elem): 4 self.elem = elem 5 self.next = None 6 self.prev = None 7 #构造双向链表类 8 class DoubleLinkList: 9 阅读全文
摘要:
1 class Node(object): 2 def __init__(self,elem): 3 #elem指数据元素 4 self.elem = elem 5 #指向下一个节点的链接域 6 self.next = None 7 #构造单向链表类 8 class singleLinkList: 阅读全文