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
Algorithms and Programs
Standard algorithms: sorting, searching and compression
- 3 things to know
- AS Unit 1
Overview
How a bubble sort puts a list into order, how an insertion sort puts a list into order and one advantage of an insertion sort over a bubble sort.
What you need to know
Answer each one before you reveal it.
Describe how a linear search finds a value.
State what must be true of a list before a binary search can be used on it.
Questions from this subtopic
Each one with the model answer underneath.
- 1
Describe how a bubble sort puts a list into order.
Model answer
A bubble sort compares each adjacent pair in turn and swaps them if they are the wrong way round, repeating these passes until a whole pass makes no swap, with the largest value reaching the end after the first pass.
- 2
How does a bubble sort detect that the list is already in order?
Model answer
It records whether any swap was made during a pass, and a pass that makes no swap at all shows every adjacent pair is in order so the sort can stop.
- 3
State the number of comparisons made by the first pass of a bubble sort on a list of 10 items.
Model answer
The first pass makes 9 comparisons, because it compares each of the 10 items with the one after it.
- 4
Describe how an insertion sort puts a list into order.
Model answer
An insertion sort takes each item in turn from the unsorted part and moves it back past every larger item until it sits in its correct place among those already sorted.
- 5
State one advantage of an insertion sort over a bubble sort.
Model answer
An insertion sort does far less work on a list that is already nearly in order, because each item usually needs no movement at all.
- 6
Describe how a linear search finds a value.
Model answer
A linear search examines each item from the beginning in turn, comparing it with the value wanted, and stops when it finds a match or reaches the end of the list.
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 Algorithms and Programs, 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.