Revision as of 16:28, 5 May 2011 by Kumar43 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

'''Recursion'''

--Divide and Conquer

if(termination condition) { solve the problem }

else { break the problem into smaller parts and solve }


'''EX''' -- fibonacci

int fib(int n) { if( n == 0 | | n == 1) return 1;

return fib( n - 1 ) + ( n - 2 ); }

Alumni Liaison

To all math majors: "Mathematics is a wonderfully rich subject."

Dr. Paul Garrett