Algorithms | Analysis of Algorithms | Question 10
The following statement is valid.
log(n!) =
(n log n).
(A) True
(B) False
Answer: (A)
Explanation: Order of growth of
and
is same for large values of
, i.e.,
. So time complexity of fun() is
.
The expression
can be easily derived from following Stirling’s approximation (or Stirling’s formula).
![]()
Recommended Posts:
- Algorithms | Analysis of Algorithms (Recurrences) | Question 11
- Algorithms | Analysis of Algorithms (Recurrences) | Question 11
- Algorithms | Analysis of Algorithms (Recurrences) | Question 6
- Algorithms | Analysis of Algorithms (Recurrences) | Question 9
- Algorithms | Analysis of Algorithms (Recurrences) | Question 4
- Algorithms | Analysis of Algorithms (Recurrences) | Question 8
- Algorithms | Analysis of Algorithms (Recurrences) | Question 7
- Algorithms | Analysis of Algorithms (Recurrences) | Question 3
- Algorithms | Analysis of Algorithms (Recurrences) | Question 2
- Algorithms | Analysis of Algorithms (Recurrences) | Question 1
- Algorithms | Analysis of Algorithms (Recurrences) | Question 11
- Algorithms | Analysis of Algorithms | Question 13
- Algorithms | Analysis of Algorithms | Question 12
- Algorithms | Analysis of Algorithms | Question 1
- Algorithms | Analysis of Algorithms | Question 2

