Add my changes to recursion . (#25155)

It describes the usage and importance of a base condition.
This commit is contained in:
Anwesh Panda
2018-11-28 18:24:28 +05:30
committed by Aditya
parent f9481b97d5
commit 1391626232

View File

@ -177,6 +177,8 @@ int divides(int a, int b) {
``` ```
NOTE: In recurssion a base codition is mandatory. Otherwise the function executes infinitely.There can be more than one base condition In the above case the bese conditions are if(n<0) and if(n==0) .
# Before you go on... # Before you go on...
## A review ## A review
* Functions are good to use because they make your code cleaner and easier to debug. * Functions are good to use because they make your code cleaner and easier to debug.