Data Structures & AlgorithmsModerateICPC regional · graph theory
Problem: What is a 'bridge' in an undirected graph?
- A. A vertex with degree zero
- B. An edge whose removal increases the number of connected components
- C. A cycle of length three
- D. The shortest path between two nodes
Correct answer: B. An edge whose removal increases the number of connected components
Removing a bridge disconnects its endpoints, which is what the low-link test detects.
More Coding Interview Problems questions
- Problem: Which algorithm finds the strongly connected components of a directed graph using a single DFS with a stack?
- Problem: What is the maximum number of edges in a bipartite graph on n vertices with sides of size n/2?
- Problem: Which problem is solved by Dijkstra's algorithm on a graph whose edge weights are small integers, using buckets (Dial's algorithm)?
- Problem: What is the best known approach for range-mode queries on a static array?
- Problem: Which concept describes the minimum number of comparisons to find the maximum of n numbers?
- Problem: What is the Ackermann-related complexity that appears in union-find analysis?