Subjects · Leaving Cert Computer Science
Leaving Cert Computer Science: Recursion
How often Recursion 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.
Quick ones on Recursion.
- The first call made to the function
- The condition that stops the recursion
- The largest input allowed
- 16
- 10
- 24
- 8
- 13
- 6
Show the answers
(a) The condition that stops the recursion
(b) 24
(c) 8
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 | B14 |
| 2024 | Not asked |
| 2023 | B15 |
| 2022 | Not asked |
| 2021 | Not asked |
Links open the State Examinations Commission’s paper for that year.
More Recursion questions
Recursion, 3 marks
p(n) returns 1 if n is 0, otherwise 2 * p(n - 1). What is p(5)?
- 10
- 16
- 32
Show the answer
32
p(0) = 1 and each step up doubles it: 1, 2, 4, 8, 16, 32. So p(n) is 2 to the power n, and p(5) = 32. 16 is p(4).
Recursion, 3 marks
s(n) returns 0 if n is 0, otherwise n + s(n - 1). What is s(4)?
- 4
- 10
- 24
Show the answer
10
s(4) = 4 + 3 + 2 + 1 + 0 = 10. This function adds where the factorial function multiplies; 24 would be 4 factorial.
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
- Sorting algorithms
- Strings & string methods
- Heuristics
- Turing machines