Example HTML page

# DS – mcq on Searching

26.Binary search is useful when there are large number of_______in array.

1. Arguments
2. values
3. Elements
4. all the above

27.In binary search, we compare the value with the elements in the __________ position of the array.

1. right
2. Left
3. Random
4. middle

28.Which of the following is not the required condition for binary search algorithm?

1. A.The list must be sorted
2. There should be the direct access to the middle element in any sub list
3. There must be mechanism to delete and/or insert elements in list.
4. Number values should only be present

29.Finding the location of the element with a given value is ___.

1. Traversal
2. Search
3. Sort
4. None of above

30. How many comparisons are needed for linear Search array when elements are in order in best case?

1. 1
2. n
3. n+1
4. n-1

31. In linear search Time complexity in best case for a successful search is___.

1. 1
2. n
3. n+1/2
4. n -1

32. In linear search Time complexity in average case for a successful search is___.

1. 1
2. n
3. n+1/2
4. n -1

33.In linear search Time complexity in average case for a Unsuccessful search is__.

1. 1
2. n
3. n+1/2
4. n -1

34.In linear search with list Time complexity in average case for a Unsuccessful search is

1. A.1
2. n
3. n+1/2
4. n -1

35.In linear search with list Time complexity in worst case for a Unsuccessful search is

1. 1
2. n
3. n+1/2
4. n -1

36.In Binary search time complexity in best case for a successful search is __

1. 1
2. Log2N
3. log n+1
4. N log N

37.In Binary search time complexity in worst case for a successful search is __

1. 1
2. Log2N
3. log n+1
4. N log N

38.In Binary search time complexity in average case for a successful search is __

1. 1
2. Log2N
3. log n+1
4. N log N

39.In Binary search time complexity in average case for a Unsuccessful search is __

1. 1
2. Log2N
3. log n+1
4. N log N

40.In Binary search time complexity in a best case for a Unsuccessful search is __

1. 1
2. Log2N
3. log n+1
4. N log N

41.In Binary search time complexity in worst case for a Unsuccessful search is __

1. 1
2. Log2N
3. log n+1
4. N log N

42.Non linear searching techniques are classified in to __ categories

1. 1
2. 3
3. 2
4. 4

43.The number of comparisons for the Binary Tree Search in best case is __

1. 1
2. n+1
3. n-1
4. n+1/2

44.The number of comparisons for the Binary Tree Search in average case is __

1. 1
2. n+1
3. n
4. n+1/2

45.The number of comparisons for the Binary Tree Search in worst case is __

1. 1
2. n+1
3. n
4. n+1/2

46.____ case does not exist in complexity theory

1. Null
2. Best
3. Average
4. worst

47.The worst case occur in linear search algorithm when item is __

1. Somewhere in the middle of the array
2. Not in the array at all.
3. The last element in the array
4. The last element in the array or is not there at all.