CSC300 / CSC402: Rules for recursion [14/14] Previous pageContents

There is an index (more generally, some metric)

    i

Start somewhere valid

    i = 0

Base case says when to stop

    i >= a.length

Inductive case takes us closer to base case

    i = i + 1

Inductive cases should not overlap!

    Exponential explosion of work!

Previous pageContents