Author |
Topic: Recursion (Read 2653 times) |
|
harsh487
Newbie
Posts: 6
|
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:
Posts: 13730
|
|
Re: Recursion
« Reply #1 on: Oct 10th, 2008, 2:45pm » |
Quote 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
Posts: 3
|
|
Re: Recursion
« Reply #2 on: Mar 22nd, 2012, 2:29am » |
Quote 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 |
|
|
|
|