Topics: Recursion, Efficient Exponentiation, Tidbits for homework 1.
Skeleton Code: PowerRunner.java, PowerComputer.java
Solution Code: PowerRunner.java, PowerComputer.java
Recursion is defining the solution to a big problem in terms of a
similar, but slightly smaller problem.
Recursive solutions have a base case and a recursive invocation
Stack frames let each invocation of a function have
its own private copy of all of its variables. This is the same for
recursive functions as it is for "normal" functions
Use wishful thinking to understand recursive problems. Keep track of
the variables that are changing vs. the variables that are constant.
Practical Lab: implement a recursive solution to exponentiation. Count
the number of calls made to your function with and without various