text: Find two children with maximum heights
code: if ( height [ u ] >= max1 ) { max2 = max1 ; max1 = height [ u ] ; } else if ( height [ u ] > max2 ) { max2 = height [ u ] ; } } } int sum = 0 ; foreach ( int u in adj [ cur ] ) { if ( u != par ) {