| | | | | |

Correctness and Loop Invariants

  • Loops
    • Loop termination
    • State entering loop
    • State exiting loop
  • Loop invariants
    • Statements that are true in each iteration of loop
    • Analogous to the "induction" part of mathematical induction

| | Top of Page | 3. Introduction to Algorithm Analysis - 11 of 23