WJEC A-Level Computer Science 601-5345-3
Hardware: Architecture, Memory and Storage
Networks and Data Transmission
Logic Gates and Boolean Algebra
Data Representation and Data Types
Data Structures
Organisation of Data: Files and Records
Database Systems
The Operating System
Algorithms and Programs
Principles of Programming
Systems Analysis
Software Engineering and Program Construction
Types of Software System
Practical Programming
Data Security and Integrity
Computing, Society and the Law
Advanced Data Structures and Logic
Recursion, Sorting and Searching
Programming Paradigms and Translators
System Design and Human-Computer Interaction
Software Engineering Tools and Professional Practice
Advanced Architecture and Assembly Language
Communication Networks and File Organisation
Number Representation and Floating Point
Databases and Distributed Systems
Operating System Management
Software Systems and Applications
Data Security, Cryptography and Attack
Advanced Data Structures and Logic
Linked lists using pointers and arrays
- 3 things to know
- A2 Unit 3
Overview
Recall questions on nodes, the head pointer and the end marker, the array implementation and its free list, inserting and deleting a node in the middle and the order the pointers must be set, doubly and circular lists, and the trade against an array.
What you need to know
Answer each one before you reveal it.
How is the end of a linked list marked?
What is the free list in an array implementation of a linked list?
Questions from this subtopic
Each one with the model answer underneath.
- 1
What is a linked list?
Model answer
A linked list is a dynamic structure in which each node holds a data item together with a pointer to the next node, so the nodes need not be adjacent in memory.
- 2
What does one node of a singly linked list contain?
Model answer
It contains the data field or fields and a single pointer field holding the location of the next node.
- 3
What is the head pointer of a linked list?
Model answer
The head pointer holds the location of the first node, and it is the only way into the list.
- 4
How is the end of a linked list marked?
Model answer
The pointer field of the last node holds a null value, which is a value that could never be a valid location.
- 5
How is a linked list represented using arrays rather than machine addresses?
Model answer
One array holds the data and a parallel array holds the subscript of the next node, with a start pointer giving the subscript of the first node and a reserved value such as −1 standing for null.
- 6
What is the free list in an array implementation of a linked list?
Model answer
The free list chains together the array positions not currently in use, so a new node is taken from it and a deleted node is returned to it.
Other ways to work this
The same content, four other ways.
What is inside Levo
Six ways to work the same material.
Every question in Advanced Data Structures and Logic, on a schedule.
Attempt a question from memory, write the correct version, then attempt it again. Levo records the jump between your first attempt and your last, and brings each question back on the day you are due to forget it.
Or £46 a year, about £3.83 a month. Cancel anytime.