Search⌘ K

Challenge: Removing a Given Edge

Explore how to implement a function that determines whether removing a specified edge from a directed graph results in separate components. Understand the problem by analyzing input and output formats and develop a step-by-step algorithm before coding. This lesson helps you sharpen graph algorithm skills vital for coding interviews.

Problem statement

Implement a function that takes a source vertex and a destination vertex as arguments and checks whether deleting the corresponding edge creates separate components in the directed graph.

Input

The inputs are a graph, a source ...