engineering recuitment Beltron Programmer Mock Test 2024 Algorithms Asymptotic Worst Case Time and Time Complexity Introduction
निम्नलिखित कलन विधि (algorithm) एक धनात्मक पूर्णांक n के क्रमगुणित में अंकों की संख्या प्राप्त करता है। निम्नलिखित में से कौन-सी इस कलन विधि की समय जटिलता नहीं है?
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)