Program to delete duplicates from a link list

Rules of recursion

 Before knowing the Rules of Recursion first we have to know what is recursion. Recursive function are the function are the function which called itself . and this processor is known as recursion . Recursion follow some rule and regulation . which are listed below…

Rules of Recursion (Property of Recursion)  :-

                                                                      Any recursive function must have following properties.
1. Should have a  base case.( A base Case is the Case where the recursive function gives the concrete (exact) solution to the input. And therefore it helps  in terminating the recursive function).
2. The recursive processor must proceed towards base case during the execution
3. There should be a recursive Call .
 
One more categorization of the recursion is as follows.
 
1. linear recursion :- A linear recursion includes only one recursive call inside the body of the  function.
 
2.Binary recursion :- In this type of recursion the body of the function has two recursive call.
Above are the Rules of  recursion which have to follow in recursive function otherwise it causes many problems like infinite loop or many more.

 

Recommended Post:

Key points:-

Cracking the coding interview:-

Array and string:-

Tree and graph:-

Hackerearth Problems:-

Hackerrank Problems:-

Data structure:-

 MCQs:-

Leave a Reply

Your email address will not be published.