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 |
What is an example of enumeration?
change to postfix a/(b+c*d-e)
How can I call a function with an argument list built up at run time?
write a program to sort the elements in a given array in c language
Why do we use null pointer?
What is the general form of function in c?
Why is conio.h not required when we save a file as .c and use clrscr() or getch() ?
write a program for even numbers?
write a program which counts a product of array elements lower than 10.
Which is best linux os?
Write any data structure program (stack implementation)
f() { int a=2; f1(a++); } f1(int c) { printf("%d", c); } c=?