01:198:111 Lecture 11: 10/10 - Recursions Continued

197 views3 pages
Verified Note

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.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents