01:198:111 Lecture 11: 10/10 - Recursions Continued
01:198:111 verified notes
11/28View all
Document Summary
From now on think about solutions to problems recursively. By working on one side at a time and repeating the process until all are solved. Key point: try to think about problems and separate them into smaller easier to solve problems. Think about it: it will take n steps towards home. Take one step and now you are n-1 steps away from home, take another you are not n-2 steps away, and etc etc . Every step you are simplifying the problem more and more. It is the computer"s ability to remember things in the run time stack. How it works is that the program it stacks the problem onto itself each time until it finds an actual number. Then the it collapses onto itself with factorial 0 giving its value to factorial 1 and factorial 1 giving it to factorial 2 and so on and so forth until factorial 6 is solved.