Show the worked solutionBound each factor of \(n!\) by \(n\):\[n!=1\cdot2\cdots n\le n\cdot n\cdots n=n^n\ \Rightarrow\ n!=O(n^n).\]Taking logarithms:\[\log n!\le\log n^n=n\log n\ \Rightarrow\ \log n!=O(n\log n).\]The estimates asked for are in terms of simple functions, which gives \(O(n^n)\) and \(O(n\log n)\). Writing \(O(n!)\) or \(O(\log n!)\) just restates the function and is not an estimate.Answer: B
GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com