When a function is called recursively for a purpose other than for a placeholder purpose, it's termed as ______ recursion.

  • Direct
  • Head
  • Indirect
  • Tail
When a function calls itself as its last operation before returning, it's called 'tail recursion.' Tail recursion is often optimized by compilers, making it an efficient way to implement certain algorithms, like calculating factorials or traversing data structures.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *