max time complexity based on constraints

by Abhishek Vaish
Jan 08, 2022



Max time complexity based on constraints


In general you can do approximately 107 to 108 operations per second depending upon the type of operations and the speed of the language



------------------ --------------------------------------------------------------------------------------------------
n Max time complexity
------------------ --------------------------------------------------------------------------------------------------
n ≤ 12 O(n!).
------------------ --------------------------------------------------------------------------------------------------
n ≤ 25 O(2n).
------------------ --------------------------------------------------------------------------------------------------
n ≤ 100 O(n4).
------------------ --------------------------------------------------------------------------------------------------
n ≤ 500 O(n3).
------------------ --------------------------------------------------------------------------------------------------
n ≤ 104 O(n2).
------------------ --------------------------------------------------------------------------------------------------
n ≤ 106 O(n log n).
------------------ --------------------------------------------------------------------------------------------------
n ≤ 108 O(n).
------------------ --------------------------------------------------------------------------------------------------
n > 108 O(log n) or O(1).
------------------ --------------------------------------------------------------------------------------------------