Computer Science - Algorithms - Recursion - Recursion Fundamentals

5 steps. Step 1 'What is Recursion?': A function that calls ITSELF. Must have: 1) Base case (when to stop), 2) Recursive case (call self with smaller input). Without base case → infinite loop → stack overflow! Step 2 'Factorial Example': def factorial(n): if n <= 1: return 1 (base case); return n *

Edodovivmagarwal
Computer Science - Algorithms - Recursion - Recursion Fundamentals
Log in

Preparing your experience...

Loading scripts and resources

Comments (0)

0/5000

Comments are reviewed before appearing publicly.

About this Experience

Computer Science - Algorithms - Recursion - Recursion Fundamentals

vivmagarwal
vivmagarwalJan 29, 2026

Description

5 steps. Step 1 'What is Recursion?': A function that calls ITSELF. Must have: 1) Base case (when to stop), 2) Recursive case (call self with smaller input). Without base case → infinite loop → stack overflow! Step 2 'Factorial Example': def factorial(n): if n <= 1: return 1 (base case); return n *

Details

Computer ScienceAlgorithmsClass 11, AS Level, Class 11, Grade 11, DP Year 1

Engagement

11

Likes

0

Remixes

0

Comments