Halfway through ex. 3.  Completed both recursive and iterative version.