CIS 1500 Lecture Notes - Lecture 20: Call Stack, Droste Effect, Exponentiation

18 views5 pages

Document Summary

The droste effect: the image of an image of an image spiraling down, never ending, this is kind of a good way to think of recursion, but not quite. Recursion: recursion as a construct may have started in literature it also occurs in nature, see fractals in nature (e. g. snowflakes, recursion in computer science is a method of problem solving. If not, simplify the problem, solve the simpler problem, assemble the results, return that solution: example: distributing a stack of papers throughout a room by recursively dividing the stack in two. 2016/11/17: recursion is about dividing up data. S x x x x x s - start. * x * x x x x blocked. * * x * x x * - open path x * * * x x e - end. Ex. a useless example: which just decrements a number to 0. recfunc(int count) { if (count == 0) { printf(done!n); return true;

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