2022-11-28T15:15:04+03:00[Europe/Moscow] en true <p>Recursion</p>, <p>Recursive defined</p>, <p>recursive procedure</p>, <p>Repetitive algorithm</p>, <p>Repetition can be implemented using loop</p>, <p>Recursive is a repetitive process in which an</p>, <p>Recursive drawback</p>, <p>2 parts of recursive</p>, <p>BASE CASE(S</p>, <p>RECURSIVE CASE(S)</p>, <p>Base case rules</p>, <p>general case rules</p>, <p>Important factors for recursive implementation</p> flashcards
Chapter 3 DSA
  • Recursion

    used to replace loops.

  • Recursive defined

    data structures, like lists, arevery well-suited to processing by recursiveprocedures and functions

  • recursive procedure

    mathematically moreelegant than one using loops

  • Repetitive algorithm

    a process wherby asequence of operations is executed repeatedlyuntil certain condition is achieved.

  • Repetition can be implemented using loop

    while, for or do..while.

  • Recursive is a repetitive process in which an

    algorithm calls itself.

  • Recursive drawback

    Execution running time for recursivefunction is not efficient compared to loop, sinceevery time a recursive function calls itself, itrequires multiple memory to store the internaladdress of the function.

  • 2 parts of recursive

    BASE CASE(S), RECURSIVE CASE(S

  • BASE CASE(S

    case(s) so simple that theycan be solved directly

  • RECURSIVE CASE(S)

    more complex – makeuse of recursion to solve smaller subproblems & combine into a solution to the larger problem

  • Base case rules

    There is one or moreterminal cases whereby the problem will be solvedwithout calling the recursive function again.

  • general case rules

    recursive call byreducing the size of the problem

  • Important factors for recursive implementation

    • There’s a condition where the function will stopcalling itself. (if this condition is not fulfilled,infinite loop will occur)• Each recursive function call, must return to thecalled function.• Variable used as condition to stop the recursivecall must change towards terminal case.