Subjects · Leaving Cert Computer Science
Leaving Cert Computer Science: Searching algorithms
How often Searching 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 2025.
OL Asked on 4 of the last 5 Ordinary Level papers, most recently in 2024. most years
Quick ones on Searching algorithms.
- It must hold only numbers
- It must be sorted
- It must have an even length
- 16
- 31
- 5
- 50
- 1
- 25
Show the answers
(a) It must be sorted
(b) 5
(c) 50
Higher Level
Asked on 2 of the last 5 Higher Level papers, most recently in 2025.
Every paper, year by year
| Year | Where it came up |
|---|---|
| 2025 | A7 |
| 2024 | Not asked |
| 2023 | B15 |
| 2022 | Not asked |
| 2021 | Not asked |
Links open the State Examinations Commission’s paper for that year.
More Searching algorithms questions
Searching algorithms, 2 marks
A linear search finds its target at the 5th position of a list. How many comparisons were made?
- 4
- 1
- 5
Show the answer
5
Linear search checks items one at a time from the start, so reaching the 5th item takes 5 comparisons. 4 is its index, as indexes start at 0.
Searching algorithms, 3 marks
A linear search looks for 12 in a list sorted smallest first. If 12 is missing, when can it stop early?
- After checking the middle item of the list
- When it reaches an item bigger than 12
- Only after checking every item in the list
Show the answer
When it reaches an item bigger than 12
In a sorted list everything after a bigger item is bigger still, so 12 cannot appear later. On an unsorted list it must check every item.
Ordinary Level
Asked on 4 of the last 5 Ordinary Level papers, most recently in 2024. most years
Every paper, year by year
| Year | Where it came up |
|---|---|
| 2025 | Not asked |
| 2024 | B13 |
| 2023 | A8 |
| 2022 | A5 |
| 2021 | A10, B14 |
Links open the State Examinations Commission’s paper for that year.
More Searching algorithms questions
Searching algorithms, 2 marks
Binary search only works if the list is…
- Short
- Made of numbers
- Sorted
Show the answer
Sorted
Binary search checks the middle item and throws away the half that can't hold the target. That only works if the items are in order.
Searching algorithms, 2 marks
Linear search checks the items…
- Last item only, then stops
- One by one from the start
- Middle item first, then half
Show the answer
One by one from the start
Linear search works on any list, sorted or not, but can be slow: it may have to check every item.
Searching algorithms, 3 marks
Linear search for 8 in [3, 8, 5, 1]. How many comparisons?
- 2
- 1
- 4
Show the answer
2
Compare with 3: no. Compare with 8: found. 2 comparisons, and the search stops as soon as it finds the target.
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
- 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
- Sorting algorithms
- Strings & string methods
- Heuristics
- Turing machines