A recursive function solves a particular problem by calling a copy of itself and solving smaller sub problems of the original problems. Many more recursive calls … 1): Terminates when the base case becomes tr… 3): Every recursive call needs extra space in the … 2): Used with functions 4): Smaller code size Rules of Recursion:-Continue reading “Recursion”
Tag Archives: factorial
For loop
A “For” Loop is used to repeat a specific block of code a known number of times. For example, if we want to check the grade of every student in the class, we loop from 1 to that number. When the number of times is not known before hand, we use a “While” loop. InitiateContinue reading “For loop”