Data structures in Python – Linked List

After queues and stacks, the third article on data structures deals with linked lists. This data structure has nodes that are connected to each other. Each node has a value and a pointer. The following figure shows a singly linked list where each node has only one pointer pointing to the next node. The first … Read more

Data Structures in Python — Stacks

In the first part of this tutorial series on data structures in Python, queues were explained. Stacks follow in the second part. A stack is also a data structure that is similar to the list. But there is a significant difference: There are several rules that dictate how items must be added or removed. New … Read more

Data structures in Python — Queues

A queue is a data structure similar to a list. However, the functionality is of a limited nature, because a queue is characterized by the fact that the FIFO principle (First In, First Out) applies here. This means that the first item added to a queue is the first item removed. Adding data is called … Read more