Example HTML page

DS – mcq on Searching

The following are the objective questions on the topic related to Searching in data structures using C/C++.

1.Finding an element, whether that is present in a list or not. It is called__

  1. Sorting
  2. Searching
  3. Storing
  4. none

Answer: B

2.In the following type of searching key-comparisons are needed

  1. Linear search
  2. Non linear search
  3. Address calculation search
  4. A and B

Answer: D

3.In the following type of searching key-comparisons are not needed

  1. Linear search
  2. Non linear search
  3. Address calculation search
  4. A and B

Answer: C

4.Binary search is ____ type of search.

  1. Linear search
  2. Non linear search
  3. Address calculation search
  4. A and B

Answer: A

5. Splay tree search is ___ type of search

  1. Linear search
  2. Non linear search
  3. Address calculation search
  4. None

Answer: B

6.B-tree search is a ___ type of search

  1. Just tree search
  2. multi-way tree search
  3. graph search
  4. None

Answer: B

7.DFS is a ____ type of search

  1. Just tree search
  2. multi-way tree search
  3. graph search
  4. None

Answer: C

8. BFS is a ____ type of search

  1.  Just tree search
  2. multi-way tree search
  3. graph search
  4. None

Answer: C

9.Binary search tree is a ___ type of search

  1. Just tree search
  2. multi-way tree search
  3. graph search
  4. None

Answer: A

10.Digital search is a __ type of search

  1. Just tree search
  2. multi-way tree search
  3. graph search
  4. None

Answer: A

11.Searching techniques are classified in to__ types

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

Answer: A

12. The element that is going to be searched in a list is called ___

  1. Key
  2. item
  3. table
  4. file

Answer: A

13.If a key is found in a list that is called ___ type of search

  1. Unsuccessful
  2. successful
  3. partial success
  4. partial unsuccessful

Answer: B

14.The following type of search is easy to implement.

  1. Linear search
  2. Non linear search
  3. Interpolation
  4. none

Answer : A

15.In linear search with array, how many comparisons are needed in best case?

  1. 0
  2. 1
  3. n
  4. n/2

Answer: B

16.In linear search with array, how many comparisons are needed in average case?

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

Answer: D

17.In linear search with array, how many comparisons are needed in worst case?

  1. 0
  2. 1
  3. n
  4. n/2

Answer: C

18.In ___type of search the list is divided in to two parts.

  1. Linear search
  2. Binary search
  3. random search
  4. None

Answer: B

19. Asymptotic complexity of linear search with array in average case is

  1. O(1)
  2. O(n)
  3. O(n/2)
  4. logn

 Answer: B

20.Asymptotic complexity of linear search with array in worst case is

  1. O(1)
  2. O(n)
  3. O(n/2
  4. logn

 Answer: B

21. Binary search algorithm cannot be applied to__

  1. Sorted Linked list
  2. sorted binary trees
  3. sorted linear array
  4. pointer array

Answer: D

22.Which of the following is not a limitation of binary search algorithm?

  1. must use a sorted array.
  2. requirement of sorted array is expensive when a lot of insertion and deletions are needed.
  3. there must be a mechanism to access middle element directly.
  4. binary search algorithm is not efficient when the data elements more than 1500.

Answer: D

23. The complexity of Binary search algorithm is

  1. O (n)
  2. O (log n)
  3. O (n2)
  4. O (logn2)

Answer: B

24.The time factor when determining the efficiency of algorithm is measured by__.

  1. Counting the number of key operations
  2. Counting the microseconds
  3. Counting the number of statements
  4. Counting the kilobytes of algorithm

Answer: A

25.Binary search can be applied on the sorted __________.

  1. array or list.
  2. Arguments
  3. Queues
  4. pointers.

Answer: A

Example HTML page

Leave a Reply

Your email address will not be published. Required fields are marked *

Pin It on Pinterest