This takes O(EV) time, scan through the adjacency lists takes O(E) time and keep a hash table for reachable vertex so for each edge u->v we check for v's adjacency list, taking O(V) time, adding new terms.