# Data Structure and Algorithms (DSA) Solved MCQs

1.

A. true, false
B. false, true
C. true, true
D. false, false
2.

## A graph is said to be complete if there is no edge between every pair of vertices.

A. true, false, true
B. true, true, false
C. true, true, true
D. false, true, true
3.

## Space Complexity iii) Is the strategy guaranteed to find the solution when there in one.

A. a-iii, b-ii, c-i
B. a-i, b-ii, c-iii
C. a-iii, b-i, c-ii
D. a-i, b-iii, c-ii
4.

A. true, false
B. false, true
C. false, false
D. true, true
5.

A. true, true
B. false, true
C. false, false
D. true, false
6.

## To find the predecessor, it is required to traverse the list from the first node in case of singly linked list.

A. i-only
B. ii-only
C. both i and ii
D. none of both
Answer» C. both i and ii
7.

A. true, true
B. true, false
C. false, true
D. false, false
8.

A. true, true
B. true, false
C. false, true
D. false, false
9.

## Insertion b) Deletion c) Retrieval d) Traversal

A. only a,b and c
B. only a and b
C. all of the above
D. none of the above
Answer» D. none of the above
10.

A. true, false
B. false, true
C. true, true
D. false, false
11.

## The complexity of the average case of an algorithm is

A. much more complicated to analyze than that of worst case
B. much more simpler to analyze than that of worst case
C. sometimes more complicated and some other times simpler than that of worst case
D. none or above
Answer» A. much more complicated to analyze than that of worst case
12.

## The Average case occur in linear search algorithm

A. when item is somewhere in the middle of the array
B. when item is not in the array at all
C. when item is the last element in the array
D. when item is the last element in the array or is not there at all
Answer» A. when item is somewhere in the middle of the array
13.

A. best case
B. worst case
C. average case
D. null case
14.

## The space factor when determining the efficiency of algorithm is measured by

A. counting the maximum memory needed by the algorithm
B. counting the minimum memory needed by the algorithm
C. counting the average memory needed by the algorithm
D. counting the maximum disk space needed by the algorithm
Answer» A. counting the maximum memory needed by the algorithm
15.

## The time factor when determining the efficiency of algorithm is measured by

A. counting microseconds
B. counting the number of key operations
C. counting the number of statements
D. counting the kilobytes of algorithm
Answer» B. counting the number of key operations
16.

## Two main measures for the efficiency of an algorithm are

A. processor and memory
B. complexity and capacity
C. time and space
D. data and space
17.

A. float
B. local
C. character
D. non-local
18.

A. character
B. integer
C. float
D. numeric
19.

A. array
B. list
C. string
D. block
20.

A. null
B. binary
C. totalled
D. list
21.

C. bit
D. byte
22.

A. main strings
B. substring
C. index
D. block
23.

A. length
B. breath
C. width
D. none
24.

A. insertion
B. deletion
C. searching
D. replacement
25.

## ________ is the problem of deciding whether or not a given String pattern P appears in a text T.

A. pattern matching
B. searching
C. sorting
D. deletion