Can linear search recursive algorithm and binary search recursive algorithm be performed on an unordered list?
Binary search can't be used
Linear search can't be used
Both cannot be used
Both can be used
Browse topic-based Data Structure And Algorithm practice sets.
302 practice sets · Page 2 of 16
Can linear search recursive algorithm and binary search recursive algorithm be performed on an unordered list?
Binary search can't be used
Linear search can't be used
Both cannot be used
Both can be used
What is the best case runtime of linear search(recursive) algorithm on an ordered set of elements?
O(1)
O(n)
O(logn)
O(nx)
The array is as follows: 1,2,3,6,8,10. Given that the number 17 is to be searched. At which call it tells that there's no such element (By using linear search(recursive) algorithm)
7th call
9th call
17th call
The function calls itself infinite number of times
The array is as follows: 1,2,3,6,8,10. At what time the element 6 is found (By using linear search(recursive) algorithm)
4th call
3rd call
6th call
5th call
Linear search(recursive) algorithm used in _____________
When the size of the dataset is low
When the size of the dataset is large
When the dataset is unordered
Never used
What is the worst case runtime of linear search(recursive) algorithm?
O(n)
O(logn)
O(n^{2})
O(nx)
Is the space consumed by the linear search(recursive) and linear search(iterative) same?
No, recursive algorithm consumes more space
No, recursive algorithm consumes less space
Yes
Nothing can be said
Is there any difference in the speed of execution between linear serach(recursive) vs linear search(lterative)?
Both execute at same speed
Linear search(recursive) is faster
Linear search(Iterative) is faster
Cant be said
Jump search has a worst case time complexity of O(n).
True
False
Jump search is worse than linear search in terms of time complexity.
True
False
Best case of jump search will have time complexity of _________
O(1)
O(n)
O(log n)
O(n log n)
In which of the following case jump search will be preferred over binary search?
jumping backwards takes significantly more time than jumping forward
jumping forward takes significantly more time than jumping backwards
when the given array is very large in size
when the given array is very small in size
Which of the following searching algorithm is fastest?
jump search
binary search
linear search
all are equally fast
What is the auxiliary space requirement of the jump search?
O(n)
O(log n)
O(n^{1/2})
O(1)
What is the value of jump taken for maximum efficiency while implementing jump search?
n/2
n^{2}
n^{1/2}
log n
What will be the maximum number of comparisons that can be made in jump search algorithm (assuming k to be blocks jumped)?
k
n/k
k-1
k-1
How many jumps will be made in the worst case of jump search(let block jumped =k)?
n*k
n/k
k/n
n+k
Which of the following step is taken after finding an element having value greater than the element being searched in jump search?
linear search takes place in the forward direction
linear search takes place in the backward direction
binary search takes place in the forward direction
binary search takes place in a backward direction
Jumps are made in the jump search algorithm until ___________
element having value less than that of the required element is found
element having value equal to the median of values of the array is found
element having value greater than that of the required element is found
middle element is found equal to the element being searched
Jump search algorithm requires which of the following condition to be true?
array should be sorted
array should have not be sorted
array should have a less than 64 elements
array should be partially sorted