Note on the rainbow connection numbers of graphs with diameter 2

Let G be a connected graph. The rainbow connection number rc(G) of a graph G was recently introduced by Chartrand et al. Li et al. proved that for every bridgeless graph G with diameter 2, rc(G) ≤ 5. They gave examples for which rc(G) ≤ 4. However, they could not show that the upper bound 5 is sharp. In this paper, we use different way to obtain the same upper bound, and moreover, examples are given to show that the upper is best possible.