What is a spanning tree of a graph?
A. A subgraph that includes only leaf nodes.
B. A subset of edges that forms a cycle.
C. A tree where all nodes are leaves.
D. A subgraph that includes all vertices and is connected without any cycles.
Answer: Option D
What is the primary difference between a directed graph and an undirected graph?
A. A directed graph has nodes with unique identifiers, while an undirected graph does not.
B. A directed graph has edges with direction, while an undirected graph does not.
C. There is no difference between them.
D. A directed graph has nodes with unique identifiers, while an undirected graph does not.
A. O(V log V)
B. O(E)
C. O(V2)
D. O(V + E)
Which of the following is true about a bipartite graph?
A. It contains a cycle of odd length.
B. It can be represented using only one adjacency list.
C. It has no edges.
D. It can be colored using two colors such that no two adjacent vertices share the same color.
A. A path that starts and ends at the same vertex with no other repetitions.
B. A path that includes all vertices exactly once.
C. A path with no edges.
D. A complete traversal of all vertices.

Join The Discussion