Given an integer array of size $N$, we want to check if the array is sorted (in either ascending or descending order). An algorithm solves this problem by making a single pass through the array and comparing each element of the array only with its adjacent elements. The worst-case time complexity of this algorithm is
Let $$f$$ and $$g$$ be functions of natural numbers given by $$f(n)=n$$ and $$g(n)=n^2$$. Which of the following statements is/are TRUE?
Which one of the following statements is TRUE for all positive functions f(n) ?
Consider the following three functions.
f1 = 10n, f2 = nlogn, f3 = n√n
Which one of the following options arranges the functions in the increasing order of asymptotic growth rate?
GATE CSE Subjects
Browse all chapters by subject