DSA
cbirer
这个作者很懒,什么都没留下…
展开
-
Queue (Linked & Sequential) in Python
@[TOC](Queue (Linked & Sequential) in Python) 1. Node class Node: def __init__(self, data): self.data = data self.next = None def __eq__(self, data): return self.data == data def __str__(self): return str(s原创 2021-02-27 02:27:01 · 141 阅读 · 0 评论 -
Linked Stack in Python
Linked Stack in Python1. Node2. Stack3. Test Codes 1. Node class Node: def __init__(self, data): self.data = data self.next = None def __str__(self): return str(self.data) 2. Stack class Stack: def __init__(self):原创 2021-02-26 23:51:01 · 134 阅读 · 0 评论 -
Circular Linked List in Python
Circular Linked List in Python1. Node2. Circular Linked List3. Test Codes 1. Node class Node: def __init__(self, data): self.data = data self.next = None def __eq__(self, data): return self.data == data def __str__原创 2021-02-26 15:41:01 · 170 阅读 · 0 评论 -
Doubly Linked List in Python
Doubly Linked List in Python1. 结点定义2. 双向链表的实现3. 测试程序 1. 结点定义 class Node: def __init__(self, data): self.data = data self.prev = None self.next = None def __eq__(self, data): return self.data == data def __str__原创 2021-02-26 15:36:09 · 145 阅读 · 0 评论 -
Singly Linked List in Python
单链表的Python语言实现1. 结点定义2. 单链表实现3. 测试程序 1. 结点定义 class Node: def __init__(self, data): self.data = data self.next = None def __str__(self): return str(self.data) 2. 单链表实现 class SinglyLinkedList: def __init__(self):原创 2021-02-26 15:27:51 · 198 阅读 · 0 评论