Ask Question
21 September, 23:18

Explain the benefits a recursive algorithm can provide. Use an example from a process in your organization or with which you are familiar.

+2
Answers (1)
  1. 22 September, 00:29
    0
    Recursion is when the function calls itself inside it's definition. The advantages of recursion are as following:-

    The problems solved by recursion have small code and elegant as compared to it's iterative solution which will be big and ugly to look at. Recursion is best suitable for data structures such as trees it's solution more understandable and easy while it's iterative solution is very big and also a bit difficult.

    #include

    using namespace std;

    int factorial (int n1)

    {

    if (n1 = = 0)

    return 1;

    return n1 * factorial (n1 - 1);

    }

    int main ()

    {

    int no;

    cin>>no;

    cout<
    return 0;

    }

    Recursive function to find the factorial of a number.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Explain the benefits a recursive algorithm can provide. Use an example from a process in your organization or with which you are familiar. ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers