Activity 01
Pair Programming: Fibonacci Showdown
Pairs implement recursive Fibonacci, then add memoization and bottom-up tabulation. They time each version with large inputs and graph results. Discuss which approach scales best.
Differentiate between dynamic programming and recursion with memoization.
Facilitation TipDuring Pair Programming: Fibonacci Showdown, circulate and ask pairs to explain their cache structure before coding, ensuring they understand how keys map to subproblems.
What to look forPresent students with a pseudocode snippet for a recursive solution to a problem (e.g., Fibonacci). Ask them to identify two instances where the same subproblem is calculated. Then, ask them to describe how memoization would prevent this redundant calculation.