Which advantages do we get using recursion? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Which advantages do we get using recursion?

Hi everybody! I have a simple question. Which advantages do we get using recursion? Thank you in advance for any help you can provide.

14th Mar 2016, 11:33 AM
Michele Paci
4 Answers
+ 3
look using loops replace of recursion is a trade of memory and speed. you know , recursives got more memory in data structure course in our university they shows us that there is some situations that recursive functions are more faster. hope to it help
18th Mar 2016, 9:49 AM
alireza khosraviyan IUT
alireza khosraviyan IUT - avatar
0
recursions can be very useful when you are looking at running your code more than once or when you don't want the code to stop running until someone tells it to
22nd Jun 2016, 4:30 PM
Jonathan de Kock
Jonathan de Kock - avatar
0
when there is repetition of a task recursion save our time, e.g when we have to organised an integer array in ascending/descending order we compare to elements of array each time (repetition of same task) here we use recursion
14th Sep 2016, 5:01 PM
Fernweh
Fernweh - avatar
- 1
recursion is door to dynamic programm algorithms
26th Jun 2016, 1:21 PM
vladimir