Add my changes to recursion . (#25155)

It describes the usage and importance of a base condition.
pull/25146/head
Anwesh Panda 2018-11-28 18:24:28 +05:30 committed by Aditya
parent f9481b97d5
commit 1391626232
1 changed files with 2 additions and 0 deletions

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...
## A review
* Functions are good to use because they make your code cleaner and easier to debug.