Question 1
What is the best case for unordered linear search? O(nlogn) O(logn) O(n) O(1),
Question 2
Where is linear searching used? When the list has only a few elements When performing a single search in an unordered list Used all the time When the list has only a few elements and When performing a single search in an unordered list,
Question 3
Which of the following is a disadvantage of linear search? Requires more space Greater time complexities compared to other searching algorithms Not easy to understand Not easy to implement,
Question 4
What is the worst case for unordered linear search? O(nlogn) O(logn) O(n) O(1),
Question 5
What is the best case and worst case complexity of ordered linear search? O(nlogn), O(logn) O(logn), O(nlogn) O(n), O(1) O(1), O(n),
Question 6
In which of the cases uniform binary search fails compared to binary search? A table lookup is generally faster than an addition and a shift Many searches will be performed on the same array Many searches will be performed on several arrays of the same length Complexity of code,
Question 7
What is the time complexity of binary search with iteration? O(nlogn) O(logn) O(n) O(n2),
Question 8
Given an array arr = {45,77,89,90,94,99,100) and key = 100; What are the mid values(corresponding array elements) generated in the first and second iterations? 90 and 99 90 and 100 89 and 94 94 and 99,
Question 9
Given an array arr = {5,6,77,88,99} and key = 88; How many iterations are done until the element is found? 1 3 4 2,
Question 10
What is the advantage of recursive approach than an iterative approach? Consumes less memory Less code and easy to implement Consumes more memory More code has to be written,
Question 11
What is the worst case complexity of binary search using recursion? O(nlogn) O(logn) O(n) O(n2),
Question 12
Which of the following is not an application of binary search? To find the lower/upper bound in an ordered sequence Union of intervals Debugging To search in unordered list,
Question 13
Binary Search can be categorized into which of the following? Brute Force technique Divide and conquer Greedy algorithm Dynamic programming,
Question 14
Which of the following methods can be used to search an element in a linked list? Iterative linear search Iterative binary search Recursive binary search Normal binary search,
Question 15
Consider the array {1,1,1,1,1}. Select the wrong option? Iterative linear search can be used to search for the elements in the given array Recursive linear search can be used to search for the elements in the given array Recursive binary search can be used to search for the elements in the given array No method is defined to search for an element in the given array