C Programming - Functions - Discussion
Discussion Forum : Functions - Yes / No Questions (Q.No. 6)
6.
Usually recursion works slower than loops.
Answer: Option
Explanation:
When a recursive call is made, the function/process clones itself and then process that funtion. This leads to time and space constrains.
In a loop, there is no recursive call involved that saves a lot of time and space too.
Discussion:
3 comments Page 1 of 1.
Anand said:
9 years ago
Recursive is faster than loops.
(1)
Chattrawit said:
10 years ago
I agree with @Mohith since I have tested with C, Python I found that recursive is faster than loops.
MOHITH said:
1 decade ago
If you're using a functional language, recursion might be faster. If you're using an imperative language, iteration is probably faster.
But in general we say recursion is faster than loops.
But in general we say recursion is faster than loops.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers