answersLogoWhite

0


Best Answer

Ans: Merits of recursion are:

Mathematical functions, such as Fibonacci series generation can be easily implemented using recursion as compared to iteration technique.

Demerits of recursion are:

Many programming languages do not support recursion; hence, recursive mathematical function is implemented using iterative methods.

Even though mathematical functions can be easily implemented using recursion, it is always at the cost of execution time and memory space.

The recursive programs take considerably more storage and take more time during processing.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the merits and demerits of recursion?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Other Math

Merits and demerits of mode?

Merits:Easy to findSuitable for qualitative dataActually observed value.DemeritsIf a large number of potential values then may require a very large number of observationsNot suitable for grouped data - easily influenced by choice of groups.


What are the merits and demerits of ratio analysis?

Financial ratio analysis is a useful tool for users of financial statement. It has following advantages:AdvantagesIt simplifies the financial statements.It helps in comparing companies of different size with each other.It helps in trend analysis which involves comparing a single company over a period.It highlights important information in simple form quickly. A user can judge a company by just looking at few numbers instead of reading the whole financial statements.LimitationsDespite usefulness, financial ratio analysis has some disadvantages. Some key demerits of financial ratio analysis are: Different companies operate in different industries each having different environmental conditions such as regulation, market structure, etc. Such factors are so significant that a comparison of two companies from different industries might be misleading.Financial accounting information is affected by estimates and assumptions. Accounting standards allow different accounting policies, which impairs comparability and hence ratio analysis is less useful in such situations.Ratio analysis explains relationships between past information while users are more concerned about current and future information.


Which is the recursive formula for the nth term in a geometric sequence?

You need to know two numbers to completely describe the geometric sequence: the starting number, and the ratio between each number and the previous one. When you use recursion, you always need a "base case", otherwise, the recursion will repeat without end. In words, if "n" is 1, the result is the starting term. Otherwise, it is the ratio times the "n-1"th term. The following version is appropriate for a programming language (written here in pseudocode, i.e., not for a specific language): function geometric(starting_number, ratio, term) if term = 1: result = starting_number else: result = ratio * geometric(starting_number, ratio, term - 1)


What are the merits and demerits of arithmetic mean?

Arithmetic mean (the average) of a series of values can gives us a fairly decent estimate of the most probable value of a next input. For example in the group: 0, 3, 4, 6, 7, 7, 8 The average is 5. This gives us a good estimate of what we should expect a value to be. However, 5 does not appear even once in the group of values. The mean is not good for finding the most used value, the middle value, or dealing with extremes (numbers much higher or lower than most numbers in the group). Other statistical terms that can help add clarification to the mean are the median (middle number), mode (the most frequent number), and the range (the positive difference between the highest and lowest values).


A 5 digit positive integer is entered through the keyboard how to write a function in C to calculate sum of digits of the 5 digits number by using recursion and without using recursion?

#include <stdio.h> int digit_sum(int); int digit_sum_rec(int); main() { int num; printf("Enter 5 digit positive integer. : "); scanf("%d",&num); printf("The sum of the digits is: %d\n",digit_sum(num)); printf("The sum of the digits is (calculated recursively): %d\n", digit_sum_rec(num)); } int digit_sum(int n) { int t=0; while(n) { t+=n%10; n/=10; } return t; } int digit_sum_rec(int n) { if(n==0) return 0; return (n%10)+digit_sum_rec(n/10); }

Related questions

Explain the merits and demerits of advertising as an aid to trade?

what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement? what is merits and demerits of posters and advertisement?


What are the Merits and Demerits of plastic?

merits and demerits of plastics


Merits and demerits of hotels?

hotel merits and demerits


Merits and demerits of friction in cricket?

criket merits and demerits


Merits and demerits of co-marketing?

Merits and Demerits of media?


What are the merits and demerits of fashion shows?

merits and demerits of fasion


What are the merits and demerits of privatization of VSNL?

merits and demerits of privatization of VSNL


What are the merits and demerits of an economic system?

What are the merits and demerits of an economic system?


What are the Merits and Demerits of Tally over Oracle Application?

what are the merits and demerits of tally?


What are the merits and demerits of business administration?

merits and demerits of wages and salary administration


What are the merits and demerits of communism?

Merits-Everyone is Equal. Demerits-Everyone is Equal.


What is merits and demerits of library management system?

merits and demerits of group dynamics