No of Labelled Trees => nn-2
https://en.wikipedia.org/wiki/Cayley's_formula
Then set each of tree node to be root, in each tree there are n ways to choose the root
Total No of rooted labeled trees => nn-2 * n => nn-1
Reference Graph Theory, Narsing Deo, Chapter on counting trees.