Maximal Tree Diameter

  • + 0 comments

    What is wrong with this approach. First I applied dfs two times to get the maximum diameter and the path of the maximum diameter. Coloring all these node occuring in maximum diameter path with black color, I applied dfs for these nodes getting the maximum length starting from this node not including the black nodes. then adding the maximum distance obtained by applying dfs two time and the maximum distance obtained from these black nodes.