Please enable JavaScript.
Coggle requires JavaScript to display documents.
kump 1, STEPHANIE, JESLIN - Coggle Diagram
kump 1
LIST
List is the most versatile data type available in functional programming languages used to store a collection of similar data items. The concept is similar to arrays in object-oriented programming.
A list is an ordered data structure with elements separated by a comma and enclosed within square brackets. A list is a data structure that supports several operations and a list consists of heterogeneous elements.
EXAMPLE OF LIST : An array of linked list is an interesting structure as it combines a static structure (an array) and a dynamic structure (linked lists) to form a useful data structure. For example, we can use an array of linked lists, where each list contains words starting with a specific letter in the alphabet.
-
LIST OPERATION
Insertion : Adds an element at the beginning of the list, in the middle of the list or at the end of the list.
-
Retrieval : Requires that data be located in a list and presented to the calling module without changing the contents of the list.
-
-
LINKED LIST
A linked list is a linear collection of data elements whose order is not given by their physical placement in memory.
-
EXAMPLE :
Basic Concept Of Linked List
-
Each element of the linked list has
-Some data
-A link to the next element
-The link is used to chain the data
A linked list whose nodes contain two fields: an integer value and a link to the next node. The last node is linked to a terminator used to signify the end of the list.
-
Types of Linked List
Single linked list
-
-
Each element in a linked list is called a node. A single node contains data and a pointer to the next node which helps in maintaining the structure of the list.
Circular linked list
Circular Linked List is a variation of Linked list in which the first element points to the last element and the last element points to the first element.
In the last node of a list, the link field often contains a null reference, a special value used to indicate the lack of further nodes.
Double linked list
Double linked list is a complex type of linked list in which a node contains a pointer to the previous as well as the next node in the sequence.
A double linked list is a linked data structure that consists of a set of sequentially linked records called nodes.
A node consists of three parts: node data, pointer to the next node in sequence (next pointer) , pointer to the previous node (previous pointer).
Circular double linked list
Circular double linked list is a more complexed type of data structure in which a node contain pointers to its previous node as well as the next node.
-
The last node of the list contains the address of the first node of the list. The first node of the list also contain address of the last node in its previous pointer.
-
-
-
Differences between list & linked list
-
-
-
-