Algorithms
(Linked List)
UKZN
ENEL2DSH2
2016
,Points to note
(Before we start!)
• Array is a list of data of the same type (Homogenous)
• 1-D array usually occupy a block of memory
• Arrays are dense list and are referred to as static data structures
(Once a block of memory has been allocated, most programmin
environment do not support compiled code with dynamic mem
block resizing)
• Relatively expensive to insert and delete elements in an array
Alternative approach is to use a linked list
, Linked list
• Technique of creating a list with the ability to add, delete, or retrieve ite
• A linked list is a data structure which is built from structures and pointer
• Successive elements in the list need not occupy adjacent space in mem
• Additional operation such as finding an item can also be provided to a
more elaborate list.