+ 2

What is the recursion in the programming?

I see that for some ordering algorithms in data structures they have the characteristic of being recursive functions, some example or short definition?

24th Apr 2018, 4:14 AM
Manuel Garcia
Manuel Garcia - avatar
4 Answers
+ 5
A brief overview of the concept: https://www.sololearn.com/discuss/307407/?ref=app
24th Apr 2018, 6:47 AM
Kuba SiekierzyƄski
Kuba SiekierzyƄski - avatar
+ 4
You can use the search feature in the Learn section for keyword "recursion", here's one of the results: https://www.sololearn.com/learn/3797/?ref=app
24th Apr 2018, 6:33 AM
Ipang
+ 2
Example of Recursion for user input // a standard function used in recursive manner to get input with no loops function getinput() { function triple(x) { return x * 3; } let inputnum = prompt("give me a number and I will multiply by 3"); if (isNaN(Number(inputnum))) { console.log("please type in a number"); getinput(); } else { console.log(triple(inputnum)); } } getinput();
24th Apr 2018, 7:23 AM
Mike Choy
Mike Choy - avatar
+ 1
Recursive function is a function that calls itself.
24th Apr 2018, 5:04 AM
Akib
Akib - avatar