public String toString(){
  StringBuilder s=new StringBuilder();
  s.append(V + " " + E+ NEWLINE);
  for (int v=0; v < V; v++) {
    s.append(v + ": ");
    for (    DirectedEdge e : adj[v]) {
      s.append(e + "  ");
    }
    s.append(NEWLINE);
  }
  return s.toString();
}

public String toString ( ) { StringBuilder s = new StringBuilder ( ) ; s . append ( V + " " + E + NEWLINE ) ; for ( int v = 0 ; v < V ; v ++ ) { s . append ( v + ": " ) ; for ( DirectedEdge e : adj [ v ] ) { s . append ( e + "  " ) ; } s . append ( NEWLINE ) ; } return s . toString ( ) ; }
returns a string representation of this edge - weighted digraph .
