Lesson 3: Linked Lists ADT Flashcards
data structure that implements a collection using a sequence of linked nodes containing data fields and pointers to the next node (or) next node and previous nodes based on its type
Linked List
an element of a list, usually implemented as an object that contains a reference to another object of the same type
Nodes
used to contain the value of the element
Data field
contains the address of the next node in the list
Pointer field
Types of Linked Lists (clue: SD)
Singly-linked list
Doubly-linked list
[Types of Linked Lists] sequence of dynamically allocated objects, each of which refers to its successor in the list
Singly-linked list
[Types of Linked Lists] sequence of nodes that points to successor and also predecessor
Doubly-linked list
[Types of Linked Lists] Where are the two nulls in doubly-linked list?
At the first and last nodes in the list