Gets the discovery time of a specific node
int getDiscoveryTime(T node) => discoveryTimes[node] ?? -1;