CIS 1500 Lecture Notes - Lecture 20: Call Stack, Droste Effect, Exponentiation
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;