Added solution for Longest path in a tree