If K is even Try to find an edge such that weight of edge i -> j and j -> i is equal
bool found = 0 ; int idx1 , idx2 ; for ( int i = 1 ; i <= n ; i ++ ) { for ( int j = 1 ; j <= n ; j ++ ) { if ( i == j ) { continue ; } if ( adj [ i ] [ j ] == adj [ j ] [ i ] ) {