Top 350+ Solved Data Structures (DS) MCQ Questions Answer

From 316 to 330 of 370

Q. Which of the following is true?

a. A graph may contain no edges and many vertices

b. A graph may contain many edges and no vertices

c. A graph may contain no edges and no vertices

d. A graph may contain no vertices and many edges

  • b. A graph may contain many edges and no vertices

Q. A graph with all vertices having equal degree is known as a

a. Multi Graph

b. Regular Graph

c. Simple Graph

d. Complete Graph

  • b. Regular Graph

Q. Which of the following ways can be used to represent a graph?

a. Adjacency List and Adjacency Matrix

b. Incidence Matrix

c. Adjacency List, Adjacency Matrix as well as Incidence Matrix

d. No way to represent

  • c. Adjacency List, Adjacency Matrix as well as Incidence Matrix

Q. The number of possible undirected graphs which may have self loops but no multiple edges andhave n vertices is

a. 2((n*(n-1))/2)

b. 2((n*(n+1))/2)

c. 2((n-1)*(n-1))/2)

d. 2((n*n)/2)

  • d. 2((n*n)/2)

Q. Number of vertices with odd degrees in a graph having a eulerian walk is

a. 0

b. Can’t be predicted

c. 2

d. either 0 or 2

  • d. either 0 or 2

Q. How many of the following statements are correct?

a. All cyclic graphs are complete graphs.

b. All complete graphs are cyclic graphs.

c. All paths are bipartite.

d. All cyclic graphs are bipartite.

  • b. All complete graphs are cyclic graphs.

Q. What is the value of the sum of the minimum in-degree and maximum out-degree of an DirectedAcyclic Graph?

a. Depends on a Graph

b. Will always be zero

c. Will always be greater than zero

d. May be zero or greater than zero

  • b. Will always be zero

Q. Where is linear searching used?

a. When the list has only a few elements

b. When performing a single search in an unordered list

c. Used all the time

d. When the list has only a few elements and When performing a single search in an unordered list

  • d. When the list has only a few elements and When performing a single search in an unordered list

Q. What is the best case for linear search?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(1)

  • d. O(1)

Q. What is the worst case for linear search?

a. O(nlogn)

b. O(logn)

c. O(n)

d. O(1)

  • c. O(n)

Q. What is the best case and worst case complexity of ordered linear search?

a. O(nlogn), O(logn)

b. O(logn), O(nlogn)

c. O(n), O(1)

d. O(1), O(n)

  • d. O(1), O(n)

Q. Which of the following is a disadvantage of linear search?

a. Requires more space

b. Greater time complexities compared to other searching algorithms

c. Not easy to understand

d. Not easy to implement

  • b. Greater time complexities compared to other searching algorithms
Subscribe Now

Get All Updates & News