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
please give me some tips for the placement in the TCS.
What is the use of pointers in C?
explain what is fifo?
What is the size of enum in c?
A float occupies 4 bytes in memory. How many bits are used to store exponent part? since we can have up to 38 number for exponent so 2 ki power 6 6, 6 bits will be used. If 6 bits are used why do not we have up to 64 numbers in exponent?
pgm to find any error in linklist(in single linklist check whether any node points any of previous nodes instead of next node)
What is null in c?
Suggesting that there can be 62 seconds in a minute?
What is the general form of function in c?
Why is #define used?
Why string is used in c?
What is const volatile variable in c?
while loop contains parts a) initialisation, evalution of an expression,increment /decrement b) initialisation, increment/decrement c) condition evalution d) none of the above
Explain what is meant by high-order and low-order bytes?
What does the message "automatic aggregate intialization is an ansi feature" mean?