How to calculate time complexity of any algorithm or program ....

need help on this..

Featured Replies

- 8
>How to calculate time complexity of any algorithm or program .... The most common metric for calculating time complexity is Big O notation. This removes all constant factors so that the running time can be estimated in relation to N as N approaches infinity. In general you can think of … Read More

- 1
[QUOTE=Radhika...;1012475]sum=0; for(i=0;i<n;i++) for(j=0;j<i;j++) sum++; what is the actual running time of this code??[/QUOTE] Not positive, but it's probably theta (n * n!) = theta (n^2). The reason I'd say that is because the outer loop is O(n) and the inner loop is always one less than whatever the value is … Read More

- 1
[QUOTE=فلذمنصور;1015810]ما هو معنى تقدير برنامج كمبيوتر[/QUOTE] I quite agree. Very strongly worded. Read More

- 1
> Just for my understanding, it means that the time complexity that we find using Big-Oh, Omega or Theta is not the actual execution time of the program? Correct. The two are related, but not 1-to-1. > Also which method will be best from the above two methods 'Best' is … Read More

**Are you able to help answer this sponsored question?**

Either the question asker or someone else made a financial contribution in order to feature this question and encourage quality replies.

This topic has been dead for over six months. Start a new discussion instead.

Recommended Topics