The following algorithm gets the number of digits in the factorial of a positive integer n. Which of the following is NOT a time complexity of this algorithm?

Algorithm getNoOfDigitsInFactorialOf(n)

{

  nd = 0

for i = 1 to n

  do

  {

       nd = nd + \(log_{10}\)(i)

  }

    nd = ceil(nd) + 1

      return nd;

}

1
Ω (lg n)
2
O(n)
3
Θ(n)
4
Ω(n)

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation