1.

Which of these is not true about recursion?(a) It’s easier to code some real-world problems using recursion than non-recursive equivalent(b) Recursive functions are easy to debug(c) Recursive calls take up a lot of memory(d) Programs using recursion take longer time than their non-recursive equivalentI got this question during an interview for a job.I need to ask this question from Recursion in division Argument Passing, Global vs Local Variables, Shallow copy vs Deep copy and Recursion of Python

Answer»

Correct choice is (b) Recursive functions are easy to DEBUG

The explanation: Recursive functions MAY be hard to debug as the LOGIC BEHIND recursion may be hard to follow.



Discussion

No Comment Found

Related InterviewSolutions