Given a directed graph with \(m\)edges, whose nodes are indexed from \(1\) to \(n\).
Satori wants to know for each node \(i\), the maximum index node it can reach.
15091509
6 6
2 6
6 5
3 2
6 3
2 1
4 5
1 6 6 5 5 6
There is no guarantee that there are no multiple edges and self-loops.