The 5-Step Live Coding Framework
1. Clarify (3 mins): Confirm constraints, input size, null/empty cases, and expected output types. 2. Example Cases (3 mins): Trace a standard input and at least 2 edge cases by hand. 3. Brute Force & Trade-Offs (5 mins): State the naive approach, state its time/space complexity, then propose an optimization. 4. Clean Implementation (15 mins): Code modularly with descriptive variable names. 5. Dry Run & Verification (5 mins): Step through your code with an example before declaring you are done.