Linked Lists Flashcards
1
Q
What are Linked Lists?
A
provides dynamism that a simple array lacks, allowing efficient insertion and deletion
elements (nodes) are linked using pointers
2
Q
What do Nodes contain?
A
data - actual value
pointer / reference - points to the next node (NULL if last node)
3
Q
Types of Linked Lists
A
Singly Linked List - nodes have a single pointer pointing to the next node
Doubly Linked List - nodes have two pointers, one pointing to the next node and one to the previous node
Circular Linked List - last node points back to the first node
4
Q
What is the time complexity of traversing Linked Lists?
A
O(n) - linear
5
Q
What kind of item is a Linked List item?
A
structured item that’s self referential
6
Q
What happens if an item
A