+ 1

# Arrange the function in ascending order based on time complexity?(Questions in code as comments)

28th Oct 2022, 2:34 PM
King
0
1. n^(0.5) - O(ân) : This function has polynomial time complexity, O(ân). It grows slower than linear but faster than logarithmic. 2. log4n - O(log n) : This function has logarithmic time complexity, O(log n), but with a different base. It grows slower than nlogn. 3. n - O(n) : This function has linear time complexity, O(n). It grows linearly with the input size. 4. nlog2n - O(nlogn) : This function has logarithmic time complexity, O(nlogn). It grows faster than linear but slower than quadratic. 5. nÂ˛ - O(nÂ˛) : This function has quadratic time complexity, O(nÂ˛). It grows quadratically with the input size. 6. 5^(log2n) - O(n^2.321) : This function can be simplified to n^(log2âľ), which is approximately n^2.321. It has polynomial time complexity, O(n^c), where đ is a constant. 7. 1 - 3âż - O(3âż) : This function has exponential time complexity, O(3âż). And n increases, the function grows rapidly. 8. 2^2n - O(2âż)
7th May 2024, 1:26 AM
`Đ˝ŃŃá¨â´â°âś
Hot today
Be honest
Pro Users