Runtime Predictions

These are some of the more commonly seen runtimes based on the input constraints

These predictions are taken from this Codeforces article.

n <=Allowed Time Complexity

12

O(n!)O(n!)

25

O(2n)O(2^n)

100

O(n4)O(n^4)

500

O(n3)O(n^3)

10410^4

O(n2)O(n^2)

10610^6

O(nlogā”n)O(n \log n)

10810^8

O(n)O(n)

Others

O(logā”n)O(\log n) or O(1)O(1)

Last updated