12.1.

April 15, 2008 rita1012

1. What keeps a recursive definition from being circular?     

a recursive definition is one that refers to itself by name in a manner that appears to be circular. the iterative definition keeps recursive definition from being circular.

2.)what are two parts of any recursive method
-A method is said to be recursive if it calls itself. First, some function f(n) is expressed in term of f(n-1) and perhaps f(n-2) and so no. Second, to prevent the definition from being circular, f(1) and perhaps f(2) and so on are defined explicitly.
3.)why is recursion more expensive than iteration
-Recursive is more expensive than iteration because it has two costs: Extra time and extra memory are required to manage recursive function calls.
4.)what are the benefits of using recursion

it could calculate sequence numbers.

 

 

 
-

Entry Filed under: Uncategorized

Leave a Comment

Required

Required, hidden



Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to comments via RSS Feed

Pages

Categories

Calendar

April 2008
M T W T F S S
« Feb   May »
 123456
78910111213
14151617181920
21222324252627
282930  

Most Recent Posts