I am going through available posts on this.
So diameter of graph:- Length of the longest distance between any two nodes.By distance it mean number of edges.
And diameter of tree :- the number of nodes on the longest path between any two leaf nodes
My question is as tree is a graph,so why can't we use same definition as of diameter of graph in tree.Are these totally different concepts?