input szie time-complexity
n<=10 O(n!)
n<=20 O(2^n)
n<=500 O(n^3)
n<=5000 O(n^2)
n<=10^6 O(nlogn) or O(n)
n>10^6 O(1) or O(logn)