Eduqas A-Level Computer Science A500QS
Data Structures: Arrays, Records and Hash Tables
Stacks, Queues, Linked Lists and Trees
Boolean Logic and Simplification
Algorithms, Pseudo-Code and Programming Constructs
Variables, Scope, Parameters and Identifiers
Recursion and Modular Programming
Sorting Algorithms
Searching and Shortest-Path Algorithms
Big O Notation and Algorithm Efficiency
Validation, Verification and Testing
Data Compression
Programming Paradigms and Computer Languages
Systems Analysis, Maintenance and Documentation
System Design and Human-Computer Interaction
Software Engineering Tools and Translators
Computing, Society and the Law
Computer Architecture, the Processor and Assembly Language
Input, Output and Secondary Storage
Networks, Protocols and the Internet
Data Transmission and Network Performance
Number Systems and Binary Arithmetic
Data Types, Characters and Floating Point
Files, Records and File Organisation
Databases, Normalisation and Entity Modelling
SQL, Big Data and Distributed Systems
The Operating System and Its Modes
Interrupts, Memory Management and Scheduling
Types of Software System
Data Security, Cryptography and Attack
Data Structures: Arrays, Records and Hash Tables
Manipulating arrays: insertion, deletion and searching
- 3 things to know
- Component 1
Overview
Flag value used for when deleting from an array, how the largest value in an array is found and initialising an array.
What you need to know
Answer each one before you reveal it.
Why is insertion into an array an expensive operation?
Describe how an element is deleted from the middle of an array.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Describe how a new value is inserted into the middle of an ordered array.
Model answer
Elements from the insertion point onwards are shifted one place towards the end. The new value is then written into the freed position.
- 2
Why is insertion into an array an expensive operation?
Model answer
An insertion may have to move every element after the insertion point. The work grows with the number of elements already stored.
- 3
Describe how an element is deleted from the middle of an array.
Model answer
Elements after the deleted position are shifted one place towards the front. The counter of items in use is then reduced by one.
- 4
Why can an element not truly be removed from a static array?
Model answer
A static array keeps its declared size whatever the program does. A deletion only overwrites the value or marks the slot as unused.
- 5
What is a flag value used for when deleting from an array?
Model answer
A flag value marks a slot as empty without moving any data. Searches then skip any element holding the flag.
- 6
How is an ordered array searched efficiently?
Model answer
A binary search repeatedly halves the part of the array still to be examined. The middle element decides which half is discarded.
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 Data Structures: Arrays, Records and Hash Tables, 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.