which is faster execution: loops or recursion?
Answers were Sorted based on User's Feedback
Answer / nipa
loop is faster then recursion. because in recursion several
time function call itself, so it take time to pass control
to function and return value, but in loop control not pass
in other function it work in same function.here we consider
that function and loop contain same number of statement.
| Is This Answer Correct ? | 4 Yes | 0 No |
Answer / sight
It's not necessary that every time faster loops only because
it's depends upon the problem.....
On this we take decision that it's faster working with loop
or recursion....
| Is This Answer Correct ? | 6 Yes | 4 No |
Example of friendly function in c++
what is the difference between #include<stdio.h> and #include"stdio.h" ?
How pointer is different from array?
prog for 1st five prime numbers in 2^x - 1
What is the significance of c program algorithms?
How is a pointer variable declared?
How to reverse a string using a recursive function, with swapping?
What is floating point constants?
Write a program to print fibonacci series using recursion?
What is c basic?
Explain what are the different file extensions involved when programming in c?
What is the most efficient way to count the number of bits which are set in an integer?