Prove reachable vertices from source computed in O(V+E)

Analyze the prove reachable vertices from source computed in o(v+e).

Examples
Input: "test_input_1"
Output: "output_1"
Hints

Prove reachable vertices from source computed in O(V+E)

Analyze the prove reachable vertices from source computed in o(v+e).