Skip to main content

Define RECURSION with Properties


A recursive function is a function that is defined in terms of itself. Similarly an algorithm is said to be recursive if the same algorithm is invoked in the body.A recursive function can go infinite like a loop. To avoid in finite running of a recursive function there are 2 properties that recursive function must have.
  • Base Criteria :
  • There must be at least one basic criteria or condition Such that when this condition is met The function stops calling itself recursively.

  • Progressive approach :

    The recursive calls should progress in such a way that each time a recursive call is made it comes closer to the base criteria.

Quote:

Believe with all of your heart that you will do what you were made to do.....