What is the time complexity of Fibonacci Search?
A. O(logn)
B. O(n)
C. O(n2 )
D. O(nlogn)
Select an option to see the answer and solution.
Is there any difference in the speed of execution between linear serach(recursive) vs linear search(lterative)?
A. Both execute at same speed
B. Linear search(recursive) is faster
C. Linear search(Iterative) is faster
D. Cant be said
Select an option to see the answer and solution.
What is the average case time complexity of binary search using recursion?
A. O(nlogn)
B. O(logn)
C. O(n)
D. O(n2 )
Select an option to see the answer and solution.
Choose the correct while loop statement from the following that finds the range where are the element being search is present (x is the element being searched in an array arr of size n)?
Options are not available for this question.
Select an option to see the answer and solution.
Can linear search recursive algorithm and binary search recursive algorithm be performed on an unordered list?
A. Binary search can't be used
B. Linear search can't be used
C. Both cannot be used
D. Both can be used
Select an option to see the answer and solution.
What is the auxiliary space complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
A. O(n + m)
B. O(m)
C. O(n)
D. O(m * n)
Select an option to see the answer and solution.
What are the updated values of high and low in the array if the element being searched is lower than the value at calculated index in interpolation search? (pos = current position)
A. low = pos + 1, high remains unchanged
B. high = pos - 1, low remains unchanged
C. low = low +1, high = high - 1
D. low = pos +1, high = pos - 1
Select an option to see the answer and solution.
What is the worst case for linear search?
A. O(nlogn)
B. O(logn)
C. O(n)
D. O(1)
Select an option to see the answer and solution.
Interpolation search is an in place algorithm.
Select an option to see the answer and solution.
What is the time complexity of Z algorithm for pattern searching (m = length of text, n = length of pattern)?
A. O(n)
B. O(m)
C. O(n + m)
D. O(m * n)
Select an option to see the answer and solution.
What is the auxiliary space requirement of the jump search?
A. O(n)
B. O(log n)
C. O(n1/2 )
D. O(1)
Select an option to see the answer and solution.
What is the best case and worst case complexity of ordered linear search?
A. O(nlogn), O(logn)
B. O(logn), O(nlogn)
C. O(n), O(1)
D. O(1), O(n)
Select an option to see the answer and solution.
What is the time complexity of binary search with iteration?
A. O(nlogn)
B. O(logn)
C. O(n)
D. O(n2 )
Select an option to see the answer and solution.
Is the space consumed by the linear search(recursive) and linear search(iterative) same?
A. No, recursive algorithm consumes more space
B. No, recursive algorithm consumes less space
C. Yes
D. Nothing can be said
Select an option to see the answer and solution.
What will be the maximum number of comparisons that can be made in jump search algorithm (assuming k to be blocks jumped)?
Select an option to see the answer and solution.
Which of the following searching algorithm is fastest when the input array is sorted but has non uniformly distributed values?
A. jump search
B. linear search
C. binary search
D. interpolation search
Select an option to see the answer and solution.
Interpolation search has a better time complexity than exponential search for any given array.
Select an option to see the answer and solution.
What is the worst case time complexity of KMP algorithm for pattern searching (m = length of text, n = length of pattern)?
A. O(n)
B. O(n*m)
C. O(m)
D. O(log n)
Select an option to see the answer and solution.
What is the auxiliary space requirement of the exponential sort when used with recursive binary search?
A. O(n)
B. O(2n )
C. O(1)
D. O(log n)
Select an option to see the answer and solution.
The naive pattern searching algorithm is an in place algorithm.
Select an option to see the answer and solution.