Java code to find the maximum path length considering any node as root
import java . io . * ; import java . util . * ; class GFG { static final int MAX_NODES = 100 ; static int in [ ] = new int [ MAX_NODES ] ; static int out [ ] = new int [ MAX_NODES ] ;