Activity 01
Pair Tracing: Memory Walkthroughs
Partners receive pseudocode for algorithms like binary search and mergesort. They draw memory diagrams step-by-step, marking auxiliary arrays and stack frames. Pairs then calculate Big O space and verify with sample inputs.
Compare time complexity and space complexity in algorithm analysis.
Facilitation TipFor Pair Tracing, provide colored pencils to distinguish heap memory from stack frames during pseudocode walks.
What to look forPresent students with pseudocode for two algorithms solving the same problem, one iterative and one recursive (e.g., Fibonacci sequence). Ask them to write down the Big O notation for the auxiliary space complexity of each and identify which uses more stack space. Discuss their reasoning.