Question: how to calculate time complexity for a given algorithm?
Answer: So we can multiply or divide by a constant factor to get to the simplest expression. So 2N becomes just N . 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.