[PYTHON] linked list

The linked list is not good with access time O (n), The insertion time is excellent at O (1).

The linked list node contains the data and next pointing to the next link. null is stored in next.

Node1.data = "G"
Node1.next = Node2
Node2.data = "R"
Node2.next = Node3
Node3.data = "O"
Node3.next = Node4
Node4.data = "W"
Node4.next = null
#Node1.next.next means Node3.

There is also a bi-directional linked list called bi-directional.

Node2.data = "5"
Node1.next = Node2
Node2.previous = Node1
#Both 1 to 2 and 2 to 1 are defined.

Recommended Posts

linked list
Understand Linked List Cycle
List comprehension
Algorithm Gymnastics 24 Reverse a Linked List
Join list
List comprehension
[Python] list
Linked list (list_head / queue) in C language
LeetCode 141. Linked List Cycle Solution Example (Python)
Algorithm Gymnastics 24 Middle of the Linked List
Python basics: list
Color code list
List type, tuple type 2
list and sum
List type, tuple type
list and numpy
Python> Comprehension / Comprehension> List comprehension
List AWS ami
Note: List comprehension
Python list manipulation
List reverse operation
Let Code Day 22 starting from scratch "141. Linked List Cycle"
About Linux llist (Lock-less NULL terminated single linked list)
Read the linked list in csv format with graph-tool
Let Code Day 30 starting from scratch "234. Palindrome Linked List"
Let Code Day78 Starting from Zero "206. Reverse Linked List"