Big-O estimates for the factorial function and the logarithm of the factorial function i.e. n! and log n! is given by
Show answerHide answer
Correct answer: (B) O(nⁿ) and O(n log n)
Explanation
N! < nⁿ for all n ≥ 1, so n! is O(nⁿ). Using Stirling's approximation, log(n!) ≈ n log n − n + O(log n), so log n! is O(n log n). Therefore, the correct answer is (b) O(nⁿ) and O(n log n).