Programming for Problem Solving (3110003)

BE | Semester-1   Winter-2019 | 07-01-2020

Q5) (a)

List the advantages of recursion.

Advantages:

  • Reduce time complexity.
  • Recursion adds clarity and reduces the time needed to write and debug code.
  • Recursion is better at tree traversal.

Disadvantages:

  • Recursion uses more memory.
  • Recursion can be slow.