Explore topic-wise MCQs in Data Structures Mcqs.

This section includes 18 Mcqs, each offering curated multiple-choice questions to sharpen your Data Structures Mcqs knowledge and support exam preparation. Choose a topic below to get started.

1.

A complete graph can have

A. N^2 spanning trees
B. n^(n-2) spanning trees
C. N^(n+1) spanning trees
D. N^n spanning trees
Answer» C. N^(n+1) spanning trees
2.

A connected graph T without any cycles is called ..

A. Free graph
B. No cycle graph
C. Non cycle graph
D. Circular graph
Answer» B. No cycle graph
3.

A directed graph is . if there is a path from each vertex to every other vertex in the digraph.

A. Weakly connected
B. Strongly Connected
C. Tightly Connected
D. Linearly Connected
Answer» C. Tightly Connected
4.

A graph is a collection of nodes, called . And line segments called arcs or .. that connect pair of nodes.

A. Vertices, edges
B. Edges, vertices
C. Vertices, paths
D. Graph node, edges
Answer» B. Edges, vertices
5.

A graph is said to be if the vertices can be split into two sets V1 and V2 such there are no edges between two vertices of V1 or two vertices of V2.

A. Partite
B. Bipartite
C. Rooted
D. Bisects
Answer» C. Rooted
6.

A .. is a graph that has weights of costs associated with its edges.

A. Network
B. Weighted graph
C. Both A and B
D. None of the above
Answer» D. None of the above
7.

What would be the time complexity of the following function which adds an edge between two vertices i and j, with some weight weigh to the graph having V vertices?

A. O(1)
B. O(V)
C. O(V*V)
D. O(log V)
Answer» B. O(V)
8.

For which type of graph, the given program would run infinitely? The Input would be in the form of an adjacency Matrix and n is its dimension (1

A. All Fully Connected Graphs
B. All Empty Graphs
C. All Bipartite Graphs
D. None of the Mentioned
Answer» C. All Bipartite Graphs
9.

Given the following adjacency matrix of a graph(G) determine the number of components in the G. [0 1 1 0 0 0], [1 0 1 0 0 0], [1 1 0 0 0 0], [0 0 0 0 1 0], [0 0 0 1 0 0], [0 0 0 0 0 0].

A. 1
B. 2
C. 3
D. 4
Answer» D. 4
10.

If locality is a concern, you can use . to traverse the graph.

A. Breadth First Search
B. Depth First Search
C. Either BFS or DFS
D. None of these
Answer» C. Either BFS or DFS
11.

If the data collection is in sorted form and equally distributed then the run time complexity of interpolation search is

A. (n)
B. (1)
C. (log n)
D. (log (log n))
Answer» E.
12.

In a graph if E=(u,v) means

A. U is adjacent to v but v is not adjacent to u
B. E begins at u and ends at v
C. U is processor and v is successor
D. Both b and c
Answer» E.
13.

Given the following program, what will be the 3rd number that d get printed in the output sequence for the given input?

A. 2
B. 6
C. 8
D. 4
Answer» D. 4
14.

Graph G is .. if for any pair u, v of nodes in G there is a path from u to v or path from v to u.

A. Leterally connected
B. Widely Connected
C. Unliterally connected
D. Literally connected
Answer» D. Literally connected
15.

A is an acyclic digraph, which has only one node with indegree 0, and other nodes have in-degree 1.

A. Directed tree
B. Undirected tree
C. Dis-joint tree
D. Direction oriented tree
Answer» B. Undirected tree
16.

Graphs are represented using

A. Adjacency tree
B. Adjacency linked list
C. Adjacency graph
D. Adjacency queue
Answer» C. Adjacency graph
17.

The spanning tree of connected graph with 10 vertices contains ..

A. 9 edges
B. 11 edges
C. 10 edges
D. 9 vertices
Answer» B. 11 edges
18.

Other name for directed graph is .

A. Direct graph
B. Bigraph
C. Dir-graph
D. Digraph
Answer» E.