[자료구조] Double Linked List (이중 연결 리스트) 구현
Double Linked List # Single Linked List class Node: def __init__(self, item, prev=None, next=None): self.item = item self.prev = prev self.next = next class DoubleLinkedList: def __init__(self): self.head = Node(None) self.tail = Node(None, self.head) self.head.next = self.tail self.size = 0 def list_size(self): return self.size def is_empty(self): if self.size != 0: return False else: return Tr..
2021.01.11