Question: Problem 3 ( Extra Credit + 3 0 points ) Given a directed graph, determine if it is strongly connected. A graph is Strongly Connected
Problem Extra Credit points
Given a directed graph, determine if it is strongly connected. A graph is Strongly Connected if every node in the graph is reachable from every other node; that is given any starting node, you can reach every other node in the graph.
Maximum time complexity: On Assumptions: None
Example: Graph:
Input: An array of vertices and an array of edges Vertexes: A B C D
Edges: A BA CB DC AD A Output: Strongly Connected
Example : Graph:
Input: An array of vertices and an array of edges Vertexes: A B C D
Edges: A BB DC AD A Output: Not Strongly Connected
Hints:
You can solve this using an adjacency list or adjacency matrix, it is up to you which to
use
You cannot assume if the graph is weighted or not, but weights actually do not matter in
this problem we only care if a relationedge exists, not what weight it may have
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
