wu :: forums
« wu :: forums - Recursion »

Welcome, Guest. Please Login or Register.
May 3rd, 2024, 10:18am

RIDDLES SITE WRITE MATH! Home Home Help Help Search Search Members Members Login Login Register Register
   wu :: forums
   riddles
   general problem-solving / chatting / whatever
(Moderators: william wu, Icarus, SMQ, ThudnBlunder, Grimbal, Eigenray, towr)
   Recursion
« Previous topic | Next topic »
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print
   Author  Topic: Recursion  (Read 2643 times)
harsh487
Newbie
*





   


Posts: 6
Recursion  
« on: Oct 10th, 2008, 1:47pm »
Quote Quote Modify Modify

Hi guys,
Is  recursion  the efficient way of solving the questions (if we look only at the time complexity)??
IP Logged
towr
wu::riddles Moderator
Uberpuzzler
*****



Some people are average, some are just mean.

   


Gender: male
Posts: 13730
Re: Recursion  
« Reply #1 on: Oct 10th, 2008, 2:45pm »
Quote Quote Modify Modify

That depends entirely on what problem you're dealing with. Using (naive) recursion to calculate Fibonacci numbers is a very bad idea, for example. But for traversing a tree, recursion is quite good.
Recursion helps to break down a problem, but it isn't always good at reusing intermediary results, which means you can end up doing the same work many times over.
IP Logged

Wikipedia, Google, Mathworld, Integer sequence DB
sunny29
Newbie
*





   
WWW

Posts: 3
Re: Recursion  
« Reply #2 on: Mar 22nd, 2012, 2:29am »
Quote Quote Modify Modify

Recursion is a technique in which a function calls itself again and again until the lower limit is reached to perform a repeated task.
 
 
IP Logged
Pages: 1  Reply Reply Notify of replies Notify of replies Send Topic Send Topic Print Print

« Previous topic | Next topic »

Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board