Number of pairs such that path between pairs has the two vertices A and B
Given an undirected connected graph and two vertices A and B, the task is to find the number of pairs of vertices {X, Y} such that any path from X to Y contains both vertices A and B.Note: { X, Y } is treated equivalent to { Y, X }.X != A, X != B, Y != A and Y != B. Examples: For the above graph: In