Algorithm Tracing
Choose a small concrete input. Record state after each meaningful step and explain the invariant or decision controlling progress.
After tracing, generalize what changes with input size and identify the dominant time or space cost when appropriate.
Teaching example
When teaching loop invariants and boundary cases, use the domain example for worked reasoning. Read it only when relevant. Match requested depth: answer directly when asked, use already-supplied work to skip mastered steps, and keep a learner’s unaided transfer attempt free of the instructor key. Preserve this skill’s scope and safety boundaries for other topics.