Data Structures: Linked List

In Software Engineering 101, the first data structure that we’re going to look at is the Linked List. As the name says, the Linked List is a list which consists of a sequence of accessible nodes. It’s both a simple and common data structure that can be used as an approach for implementations of queues, stacks, lists and associative arrays. But why would we not just use an array for this anyway? Well, to begin with Arrays are of a fixed size meaning memory must be allocated for the specified size upon initialisation. However, Linked Lists allocate memory at runtime for the amount that is required (due to it being a dynamic data structure). If we wish to add a new item at the end of our array then this can be an issue if the array is full. If so, this would mean creating a whole new array of a larger size and copying over the values. In a

read more Data Structures: Linked List