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 Help Members By Posting Answers For Below Questions

what is the diffrenet bettwen HTTP and internet protocol

1396


What does *p++ do? What does it point to?

620


what will be the output for the following main() { printf("hi" "hello"); }

9348


Explain how do you list a file’s date and time?

621


What are static variables in c?

631






What is table lookup in c?

633


Explain what are reserved words?

638


Can we declare variables anywhere in c?

582


What is the condition that is applied with ?: Operator?

667


Explain union.

641


What do you mean by a sequential access file?

631


why programs in c are running with out #include? some warnings are display in terminal but we execute the program we get answer why? eg: main() { printf("hello world "); }

1320


Compare array data type to pointer data type

603


What is realloc in c?

581


If one class contains another class as a member, in what order are the two class constructors called a) Constructor for the member class is called first b) Constructor for the member class is called second c) Only one of the constructors is called d) all of the above

626