How To Find Time Complexity Of An Algorithm
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 it like this: statement; Is constant. The running time of the statement will not change in relation to N. for (i = 0; i < N; i++) statement; Is linear. The running time of the loop is directly proportional to N....