Time complexity of the following

I was just wondering what will be the time complexity of O(10^8)

Your notation here implies that the time complexity does not depend on the size of the input. Hence, it can be said that your algorithm is constant time.

http://en.wikipedia.org/wiki/Time_complexity#Constant_time

1 Like

From my limited knowledge of competitive programming, if the time complexity is of O(10^8) it will run in 1 second. But this is risky. We cant give any assurity that it will run. But if it is 10^6, then it will definitely run within 0.1 seconds. Even O(10^7) is not risky. This will give you an idea before submitting the code whether it will lead to TLE or not looking at the worst case!!

Happy Coding