Graph Theory - Graph with degree at most 3 I've got a graph theory/combinatorics question that I'm really struggling with, and would appreciate some help. The question says:
Suppose $G$ is a graph such that every vertex has degree at most 3, and the shortest path between any two vertices has length at most 2. Show that $G$ has at most 10 vertices, and construct such a graph with 10 vertices.

Let V be the set of verticies of G. Let u be the vertex of maximum degree,Let A be the set of neighbours of u and Let B be the set of all neighbours of neighbours of u except u. since the distance between any 2 verticies is at most 2 therefore V-{u} is a subset of A U B. Since the maximum degree is <= 3 therefore $|A|<=3$ by a similar argument we knw that the number of neighbours(different from u) of neighbours of u is at most 2. Therefore |B| <= 2|A| threfore  |V-{u}| <=|A U B| <= |A|+|B| <= 3|A| <= 9 therefore |V| <= 10
