CMPSC 122 Chapter Notes - Chapter 4: Binary Search Algorithm, Fibonacci Number, Nested Function

40 views2 pages

Document Summary

Recursion is an alternate method of achieving repetition. Can often be achieved with the same method as regular function calls. Gives the number of permutations of a sequence of n items. { n * (n - 1)! if n = 0 if n >= 1. Each entry of trace corresponds to a recursive call. Every time a function is called, an activation record or frame is created to store information about the function. Includes information about parameters and local variables. When execution of a function leads to a function call, the activation record saves the current state of the function and pauses at the point of flow the program will return to when the nested function returns. Fractal: a shape that has a self-recursive structure at various levels of magnification. Candidate: an item which, at the current stage of the search, cannot be ruled out as a match to the target.

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