What are the disadvantages of Recursions?
Following are the disadvantages of recursions:
- It consumes more storeage space because the recursive calls along with automatic variables are stored on the stack.
- The computer may run out of memory if the recursive calls are not checked.
- It is not efficient in terms of speed and execution.
- some porgram does not offer any concrete advatnages over non-recursive function.
- if proper care is not taken, recursion may result in non-terminating functions.
- recursion is not advocated when the problem can be solved through iteration.
- Looping concept can not be implemented in recursion.
- Not all the programs can be written recursively.
0 comments:
Feel free to contact the admin for any suggestions and help.