Question: 1. Let G (V, E) be a directed graph. A black hole is a vertex v E V such that all vertices uu have an

1. Let G (V, E) be a directed graph. A black hole is a vertex v E V such that all vertices uu have an outgoing edge (u, u) leading to u . and v has no outgoing edge. (a) Design an algorithm which can detect whether or not there is a black hole in a directed graph. You must describe your algorithm in plain English (no pseudocode). You must clearly state what graph representation you are working with (adjacency matrix or adja- cency list.s). You must give the running time of your algorithm and explain why you get this running time
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
