Archive for April 15th, 2008




12.1.

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.

 

 

 
-

Add a comment April 15, 2008

Pages

Categories

Links

Meta

Calendar

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

Posts by Month

Posts by Category

 
Follow

Get every new post delivered to your Inbox.