Recursion trips up more Python developers in technical interviews than almost any other concept. Not because recursion itself is complicated, but because most people try to hold the entire call stack in their head at once.
You do not need to hold it all in your head. You need a trace table.
A trace table is a grid where each row represents one step of execution. You track every variable, every function call, and every return value in sequence. When you are done, you have a complete picture of what the code actually does rather than what you think it does.
This article walks through exactly how to build one for a recursive Python function, step by step.
The Problem






