Linked List (OCR A-Level Computer Science): Flashcards
📚Flashcards
Practise the cards
13 cards from this deck
ShowHide
Practise the cards
13 cards from this deck
Linked list definition
Linked list definition
Dynamic data structure with nodes storing data & pointer to next node
Linked list memory requirement
Linked list memory requirement
Don't require contiguous memory locations
Components of a node in linked list
Components of a node in linked list
Data and pointer to next node
Head in linked list
Head in linked list
First node in the linked list
Tail in linked list
Tail in linked list
Last node, points to NULL
Singly linked list characteristic
Singly linked list characteristic
Each node points to the next node
Doubly linked list characteristic
Doubly linked list characteristic
Each node points to both next and previous nodes
Circular linked list characteristic
Circular linked list characteristic
Last node points back to first node
Advantage of linked lists for insertions/deletions
Advantage of linked lists for insertions/deletions
No shifting of elements required
Use case: Linked lists for stacks & queues
Use case: Linked lists for stacks & queues
Implementing stacks and queues with dynamic size management
Delete from beginning of linked list
Delete from beginning of linked list
Update head to point to next node
Cause of infinite loops in linked list traversal
Cause of infinite loops in linked list traversal
Not setting last node's next pointer to NULL
Critical requirement for linked list integrity
Critical requirement for linked list integrity
Proper pointer management
