constructor(directed) {
    this.directed = typeof directed === 'undefined' || Boolean(directed);
    this.adjList = Object.create(null);
    this.vertices = new HashSet();
  }
Adjacency list representation of a graph
@param {bool} directed