---
title: Lecture 5 – Recursion
subject: Mathematik
topic: Funktionen und Rekursion
---

## Did today's example make sense?
type: yes_no
difficulty: easy
tags: recap
allow_resubmission: false
correct: yes
time_limit: 30

---

## How confident do you feel about recursion?
type: scale_0_5
tags: confidence
time_limit: 45

---

## Which of these is a base case?
type: multiple_choice
difficulty: medium
tags: recursion
media: https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/Sierpinski_triangle.svg/240px-Sierpinski_triangle.svg.png
correct: return 1 when n == 0
time_limit: 60
options:
- return n
- return 1 when n == 0
- recurse forever

---

## Watch this and tell me what was unclear
type: text
media: https://www.youtube.com/embed/Mv9NEXX1VHc
allow_resubmission: true

---

## What's the time complexity of a naive recursive Fibonacci?
type: flip_card
difficulty: hard
tags: recursion, complexity
correct: O(2^n) — each call branches into two more

---

## Which of these are valid base cases for a recursive function?
type: quiz
difficulty: medium
tags: recursion
time_limit: 45
options:
- [x] return 0 when n == 0
- return n - 1
- [x] return 1 when n == 1
- call the function again with the same n

---

## Put these steps of the recursive Fibonacci call in the right order
type: sort
difficulty: medium
tags: recursion
time_limit: 60
options:
- Call fib(n) with n > 1
- Recurse into fib(n-1) and fib(n-2)
- Hit the base case (n == 0 or n == 1)
- Sum the two results and return

---

## Listen to this podcast and share one takeaway
type: text
media: https://example.com/podcasts/episode-1.mp3
media_kind: audio
tags: podcast
allow_resubmission: true
