ISC · Computer Science · Recursion
Practice question
3 marksOriginal Khojo Papers practice question written to the ISC Computer Science syllabus — not from a past board or specimen paper.
Write a recursive Java method to reverse a string.
ISC · Computer Science · Recursion
Original Khojo Papers practice question written to the ISC Computer Science syllabus — not from a past board or specimen paper.
Write a recursive Java method to reverse a string.
Only on this page: it is kept if you say you got it wrong, so you can compare later.
Watch a teacher solve this on the board, step by step, with voice. Then ask about any step.
No checked answer or marking scheme for this question yet.
Its answer has not been reviewed. The AI Examiner marks only questions that have an official marking scheme or an answer a teacher has reviewed.
From the same topic and chapter, at a similar level.
Write a recursive Java method to compute the nth term of the Fibonacci sequence, taking the first two terms as 0 and 1.
Recursion
Write a recursive Java method to find the greatest common divisor of two positive integers.
Recursion
Write a recursive Java method to compute the factorial of a non-negative integer n.
Recursion
State two advantages and two disadvantages of recursion compared with iteration.
Recursion
How many times is the method called in total when fact(5) is executed, taking fact(0) as the base case?
Recursion
Reduce F(A, B, C) = Σ(0, 1, 2, 3) using a Karnaugh map.
Karnaugh Maps