結果 : find diameter of a tree algorithm