growthmindsit

Linked Lists

What is a Linked List?

linear data structures, which means that there is a sequence and an order to how they are constructed and traversed.

Memory management

when a linked list is born, One byte could live somewhere, while the next byte could be stored in another place in memory altogether! Linked lists don’t need to take up a single block of memory; instead, the memory that they use can be scattered throughout.

linked lists are dynamic data structures ;so it can shrink and grow in memory. It doesn’t need a set amount of memory to be allocated in order to exist, and its size and shape can change, and the amount of memory it needs can change as well.

Parts of a linked list:

A linked list is made up of a series of nodes, which are the elements of the list.

To list or not to list?

a linked list is usually efficient when it comes to adding and removing most elements, but can be very slow to search and find a single element.

Github view