Activity 01
Pair Tracing: Recursive Space Simulation
Pairs select a recursive algorithm like factorial. One student traces stack frames on paper for inputs n=1 to 10, noting memory per call. They swap roles, plot space usage, and compare with iterative version.
Differentiate between time complexity and space complexity.
Facilitation TipBefore Pair Tracing, give each pair a small whiteboard to draw the call stack as they trace, so recursion depth becomes visible.
What to look forPresent students with a simple iterative function and its recursive equivalent that both solve the same problem (e.g., factorial). Ask them to write down the Big O notation for the space complexity of each and justify their answer, focusing on the recursion stack for the recursive version.