Time complexity, Big-O for this function?
It runs in time $O(n)$. Remember that a function only returns once.  In each call to&nbsp;f, the for loop is immediately terminated at i=0 by the return statement, so the function body is equivalent to

if n &lt; 100000
    return 0;
else
    return f(n-1);


However, your answer of $O((n!)^2)$ is not wrong: $(n!)^2$ is a huge overestimate of the running time, but big-$O$ essentially means "at most this much."