What is the time complexity of the following loop? function (n)
    i = 1
    s = 1
    while (s &lt;= n)
        i = i+1
        s = s*i
        print "*"
end
Assuming all operations are done in constant time, this loop runs in $\Theta(n!^{-1})$ where $!^{-1}$ is the inverse factorial. Intuitively, the program will enter the loop $i$ times, $i$ being the smallest integer so that $i!\geq n$.