DFS from X ( other end of diameter ) and check the farthest node ( s ) from it
dfs ( X , - 1 , 0 , true , adj ) ; } static void printDiameters ( Vector < Integer > [ ] adj ) { dfsUtility ( adj ) ; for ( int i = 1 ; i <= 6 ; i ++ ) {