(CC-2042)
Lecture 15
E N G R. D R B I L A L A S H FA Q A H M E D
S C H O O L O F S Y S T E M S A N D T E C H N O LO GY ( S S T )
C O M P U T E R S C I E N C E FA C U LT Y
,What is Recursion?
Definition: Key Visualization
A programming Components:
Base Case: Condition Russian nesting do
technique where a to stop recursion. analogy.
function calls itself Recursive
directly or indirectly. Case: Function calls
Breaks down complex itself with modified
problems into simpler parameters.
subproblems.
09/06/2025 DS
, Function Call Stack:
• Each recursive call adds a new
layer.
How Execution of Base
Recursion Case:
Works • Stops further recursive calls.
Unwinding the Stack:
• Returns values back up the cal
stack.
09/06/2025 DS