In a graph with weighted edges, what does the term "relaxation" refer to in shortest path algorithms?
A. Expanding the adjacency list of a vertex.
B. Removing edges that cause negative cycles.
C. Updating the shortest path estimate if a shorter path is found.
D. Adding a new vertex to the graph.
Answer: Option C
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