![[Python] Single Linked List(단일 링크드 리스트)](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FYIv4S%2FbtsnxW1pA6S%2FQy0wznQqtS0dj1xE9odoE1%2Fimg.png)
자료구조 & 알고리즘/자료구조2022. 12. 9. 02:02[Python] Single Linked List(단일 링크드 리스트)
노드 클래스 class Node: def __init__(self, data): self.data = data self.next = None Single Linked List 클래스 class SLL: def __init__(self, data): #생성자 self.head = Node(data) def append(self, data): #노드 추가 current_node = self.head while current_node.next is not None: current_node = current_node.next current_node.next = Node(data) def print(self): #노드 출력 current_node = self.head while current_node is not..