# 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__

- Sorting
- Searching
- Storing
- none

Answer: B

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

- Linear search
- Non linear search
- Address calculation search
- A and B

Answer: D

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

- Linear search
- Non linear search
- Address calculation search
- A and B

Answer: C

4.Binary search is ____ type of search.

- Linear search
- Non linear search
- Address calculation search
- A and B

Answer: A

5. Splay tree search is ___ type of search

- Linear search
- Non linear search
- Address calculation search
- None

Answer: B

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

- Just tree search
- multi-way tree search
- graph search
- None

Answer: B

7.DFS is a ____ type of search

- Just tree search
- multi-way tree search
- graph search
- None

Answer: C

8. BFS is a ____ type of search

- Just tree search
- multi-way tree search
- graph search
- None

Answer: C

9.Binary search tree is a ___ type of search

- Just tree search
- multi-way tree search
- graph search
- None

Answer: A

10.Digital search is a __ type of search

- Just tree search
- multi-way tree search
- graph search
- None

Answer: A

11.Searching techniques are classified in to__ types

- 2
- 3
- 4
- none

Answer: A

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

- Key
- item
- table
- file

Answer: A

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

- Unsuccessful
- successful
- partial success
- partial unsuccessful

Answer: B

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

- Linear search
- Non linear search
- Interpolation
- none

Answer : A

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

- 0
- 1
- n
- n/2

Answer: B

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

- 0
- 1
- n
- n+1/2

Answer: D

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

- 0
- 1
- n
- n/2

Answer: C

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

- Linear search
- Binary search
- random search
- None

Answer: B

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

- O(1)
- O(n)
- O(n/2)
- logn

Answer: B

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

- O(1)
- O(n)
- O(n/2
- logn

Answer: B

21. Binary search algorithm cannot be applied to__

- Sorted Linked list
- sorted binary trees
- sorted linear array
- pointer array

Answer: D

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

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

Answer: D

23. The complexity of Binary search algorithm is

- O (n)
- O (log n)
- O (n2)
- O (logn2)

Answer: B

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

- Counting the number of key operations
- Counting the microseconds
- Counting the number of statements
- Counting the kilobytes of algorithm

Answer: A

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

- array or list.
- Arguments
- Queues
- pointers.

Answer: A