Opening the reading…
Opening the reading…
DSA FUNDAMENTALS › RECURSION BASICS
This is a scratch drill — your code runs, nothing is graded or recorded. No test cases, no expected output, no verdict.
TASK
Implement branch(3) so each non-base call makes two sequential calls to branch(n - 1). Count every invocation and track the maximum number of active stack frames, then print both values.
OUTPUT
Sampletotal calls: 15 maximum active frames: 4
What a finished answer prints, from the lesson. Nothing has run yet — press Run and this is replaced by your program’s own output.