# Can we use recursion for large pool of input data? [closed]

While studying recursion, I came to know that for every function call it has to store intermediate data on stack for later use. If so, then for large amount of data, recursion can be inefficient. Storing large intermediate data can cause memory overflow. Can you please explain, then why recursion is used at all? If possible, can you please provide one practical application of recursion.

Thanks!

## closed as unclear what you're asking by David Richerby, fade2black, Evil, Hendrik Jan, quicksortDec 23 '17 at 15:18

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• I don't understand your question: it seems to be "Recursion is expensive, so why does nobody use it?" Isn't the answer right there in the question. Except that you're working from a false premise: programmers do use recursion. All the time. In any case, this seems to be a question about programming, not about computer science. – David Richerby Dec 21 '17 at 22:18
• @DavidRicherby which type of questions are Computer Science questions? Introduction to Algorithm by Cormen is a book on Computer Science or Programming? Only programmers will use recursion and not a Chef. This question came to me after reading recursion topic from Cormen. Don't jump to conclusion. I haven't ask anything on coding or technology. I have asked simple concept of C.S. Also, read the main question, you read description and left. It is said that it is handy technique, but then I don't see it is use on daily basis. So, It could be that people don't use of recursion or it is expensive – Ubi hatt Dec 22 '17 at 2:02
• Youor question is about what programmers do. That is absolutely a question about programming. Cormen et al. is a book about computer science: it covers agorithms and data structures and says little to nothing about how to actually program them. And, honestly, it's pretty ridiculous to claim that I didn't read your whole questoin when that question is only 41 words. – David Richerby Dec 22 '17 at 2:10
• I have edited question. Hope, it is now CS question! – Ubi hatt Dec 22 '17 at 2:18
• You've just replaced the word "programmers" to "we". That changes nothing at all. – David Richerby Dec 22 '17 at 2:36