what are the advantage and disadvantage of recursion
Answer Posted / jyoti singh
Advantages of recursion:-
1.Recursion is more efficient if the program using recursion is run on computer with multiprocessing facilities.
2.It is very useful in solving the data structure problems.
3. It is easily, simple and understandable.
Disadvantages of recursion:-
1. It requires more memory because recursive calls along with automatic variables are stored on the stack.
2.The computer may run out of memory if recursive calls are not properly checked.
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
What does c mean in standard form?
List the different types of c tokens?
why arguments can generally be passed to functions a) sending the values of the arguments b) sending the addresses of the arguments c) a & b d) none of the above
Why & is used in c?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
What is the auto keyword good for?
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
Write a program in c to replace any vowel in a string with z?
Explain the difference between getch() and getche() in c?
How to define structures? ·
Program to find the sum of digits of a given number until the sum becomes a single digit. (e.g. 12345=>1+2+3+4+5=15=>1+5=6)
What will be your course of action for a push operation?
Explain how do you sort filenames in a directory?
What is union and structure?
What is 1f in c?