Data Structures & AlgorithmsHardGATE CS · ICPC regional
Connected undirected graph on vertices A, B, C, D, E, F with edges A–E (1), B–D (1), C–E (1), C–F (1), D–E (1), E–F (1) (weights ignored). How many articulation points (cut vertices) does it have? A cut vertex is one whose removal, with its incident edges, leaves the remaining vertices disconnected.
- A. 4
- B. 1
- C. 3
- D. 2
Correct answer: D. 2
Deleting each vertex and testing the rest gives 2 cut vertices. Bridges are a different count (the edge version) and degree heuristics are not sufficient.
Practise more Trees, Graphs, Recursion and Dynamic Programming questionsTrees, Graphs, Recursion and Dynamic Programming: notes and key points
More Trees, Graphs, Recursion and Dynamic Programming questions
- On an 8 × 8 chessboard with rows and columns numbered 0 to 7, a knight starts at (1, 0) and must reach (2, 5) (as (row, column)). A knight…
- Directed weighted graph on vertices A, B, C, D, E, F with edges listed in this exact order: D→B (2); A→E (7); A→C (3); D→C (-1); B→A (-2)…
- Connected undirected graph on vertices A, B, C, D, E, F, G, H with edges A–D (1), B–F (1), B–G (1), B–H (1), C–H (1), D–G (1), E–H (1)…
- Array A = [3, 1, 7, 5, 2, 5, 4, 6, 1] (indices 0 to 8). Count the non-empty subsets of positions (each position used at most once, subsets…
- Connected undirected graph on vertices A, B, C, D, E, F, G, H with edges A–B (1), A–E (1), A–F (1), B–E (1), C–E (1), D–E (1), E–G (1)…
- Undirected weighted graph on vertices A, B, C, D with edges A–B (1), A–C (1), A–D (1), B–C (3), B–D (2), C–D (1). How many distinct…