Let G be a directed graph with N vertices. A vertex s is called a sink if,

Question:

Let G be a directed graph with N vertices. A vertex s is called a sink if, for every v in V such that s ≠ v, there is an edge (v, s), and there are no edges of the form (s, v). Give an O(N) algorithm to determine whether or not G has a sink, assuming that G is given by its N × N adjacency matrix.
Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: