Search⌘ K
AI Features

Solution: Graphs

Explore how to implement and understand an algorithm to detect a universal sink in directed graphs. This lesson guides you through using adjacency matrices to find a vertex with no outgoing edges but incoming edges from all others, running in linear time.

We'll cover the following...

Task

Here is the task that finds the universal sink in a graph GG. A universal sinkA universal sink, v, is also sometimes called a celebrity: Everyone in the room recognizes v, but v doesn’t recognize anyone else in the room. ...