SEARCH
You are in browse mode. You must login to use MEMORY

   Log in to start

level: Recursion

Questions and Answers List

level questions: Recursion

QuestionAnswer
Define recursionDefinition: Recursion occurs when a function calls itself.​
Decribe a gerneral way to impliment any recursive problemAm I at the base case? ​ If so, return the easy solution if a function and stop recursing; or if a procedure stop recursing.​ Otherwise, think in terms of solving the current problem by moving closer to the base case with a slightly simpler problem and solving this simpler problem.​
Define a Recursively-defined function/procedureA recursively-defined function/procedure is a function/procedure which calls itself or which is defined in terms of itself.​
Define a recursive objectAn object is said to be recursive if it partially consists of or is defined in terms of itself.​
Impliment a recursive formula for generating positive integers between 1 and 5begin with x to the 1 = 5​ x to the n+1 = x to the n – 1 ​ stop when x to the n+1 = 1