Subjects · Leaving Cert Computer Science
Leaving Cert Computer Science: Sorting algorithms
How often Sorting algorithms comes up on the Computer Science papers, every year it was asked, and questions to try.
HL Asked on 2 of the last 5 Higher Level papers, most recently in 2024.
OL Asked on 1 of the last 5 Ordinary Level papers, most recently in 2025.
Quick ones on Sorting algorithms.
- [1, 2, 4, 5]
- [1, 4, 2, 5]
- [1, 5, 4, 2]
- The middle item
- The smallest item, at the start
- The largest item, at the end
- [1, 3, 9, 7]
- [1, 7, 9, 3]
- [3, 7, 9, 1]
Show the answers
(a) [1, 4, 2, 5]
(b) The largest item, at the end
(c) [1, 3, 9, 7]
Higher Level
Asked on 2 of the last 5 Higher Level papers, most recently in 2024.
Every paper, year by year
| Year | Where it came up |
|---|---|
| 2025 | Not asked |
| 2024 | B14 |
| 2023 | Not asked |
| 2022 | B14 |
| 2021 | Not asked |
Links open the State Examinations Commission’s paper for that year.
Ordinary Level
Asked on 1 of the last 5 Ordinary Level papers, most recently in 2025.
Every paper, year by year
| Year | Where it came up |
|---|---|
| 2025 | A11 |
| 2024 | Not asked |
| 2023 | Not asked |
| 2022 | Not asked |
| 2021 | Not asked |
Links open the State Examinations Commission’s paper for that year.
More Sorting algorithms questions
Sorting algorithms, 2 marks
Bubble sort compares and swaps…
- Only the first and last items
- Items picked at random
- Pairs of neighbouring items
Show the answer
Pairs of neighbouring items
Each pass compares neighbours and swaps them if they are out of order. After pass 1 the largest value has bubbled to the end.
Sorting algorithms, 3 marks
List [5, 1, 4, 2]. After ONE full pass of bubble sort (smallest first), the list is…
- [1, 5, 4, 2]
- [1, 4, 2, 5]
- [1, 2, 4, 5]
Show the answer
[1, 4, 2, 5]
5,1 swap: [1,5,4,2]. 5,4 swap: [1,4,5,2]. 5,2 swap: [1,4,2,5]. One pass isn't enough; more passes are needed.
Sorting algorithms, 2 marks
Selection (simple) sort, smallest first: each pass finds the…
- Smallest remaining item and puts it in place
- Middle item and moves it to the end of the list
- Two neighbours and swaps them if needed
Show the answer
Smallest remaining item and puts it in place
Pass 1 finds the smallest and puts it first, pass 2 the next smallest, and so on. Swapping neighbours is bubble sort.
Other Computer Science topics
- Abstraction & pattern recognition
- Binary & hexadecimal
- CPU, memory & storage
- Embedded systems & sensors
- Ethics & social impact
- Flowcharts & pseudocode
- Internet, WWW & protocols
- Loops & trace tables
- Problem solving & puzzles
- Selection & Boolean logic
- Universal design & accessibility
- Variables, data types & operators
- Algorithmic complexity
- Data analytics & data quality
- Functions & modules
- Logic gates & truth tables
- Roles, teams & stakeholders
- Searching algorithms
- Testing & debugging
- AI & machine learning
- ASCII & Unicode
- Design process & SDLC
- History & emerging trends
- Lists
- Privacy & cybersecurity
- Basic electronics
- Databases
- Modelling & simulation
- Operating systems
- Quicksort
- Recursion
- Strings & string methods
- Heuristics
- Turing machines