Loading

Define how recursion works

Recusion works by creating a method which is defined in terms of itself. This effectively means that the method will make method calls to itself. It makes these calls using increasingly reduced problem sizes as arguments, until a base case is reached. These method calls are stored in a stack, and when the base case is reached, the stack is evaluated, as they are, in a last-in-first-out order, leading to a final result.

Answered by Maximilian K. Computing tutor

206 Views

See similar Computing IB tutors
Answered by Maximilian K.
Computing tutor

206 Views

See similar Computing IB tutors
A pair of laptops with a tutor displayed on one and a student on the other. The student is raising his hand to answer the teacher's question.
Need help with Computing?

Have a Free Video Meeting with one of our friendly tutors.

A pair of laptops with a tutor displayed on one and a student on the other. The student is raising his hand to answer the teacher's question.
Need help with Computing?

Have a Free Video Meeting with one of our friendly tutors.

A pair of laptops with a tutor displayed on one and a student on the other. The student is raising his hand to answer the teacher's question.
Need help with Computing?

Have a Free Video Meeting with one of our friendly tutors.