func (g *Graph) AddVertex(key int) *Vertex {
	v := NewVertex(key)
	g.Vertices = append(g.Vertices, v)

	return v
}
// AddVertex creates a new vertex with the given
// key and adds it to the graph
// there's no error handling for duplicate keys
AddVertex creates a new vertex with the given
key and adds it to the graph
there's no error handling for duplicate keys
// AddVertex creates a new vertex with the given // key and adds it to the graph // there ' s no error handling for duplicate keys
func (g *Graph) AddVertex(key int) *Vertex {
	v := NewVertex(key)
	g.Vertices = append(g.Vertices, v)
	return v
}
func ( g * Graph ) AddVertex ( key int ) * Vertex { v := NewVertex ( key ) g . Vertices = append ( g . Vertices , v ) return v }
AddVertex creates a new vertex with the given
key and adds it to the graph
there's no error handling for duplicate keys
AddVertex creates a new vertex with the given key and adds it to the graph there ' s no error handling for duplicate keys