Consider next vertex if it is not same ( diagonal entry in adjacency matrix and not visited already )
if ( adj [ curr_path [ level - 1 ] ] [ i ] != 0 && visited [ i ] == false ) { int temp = curr_bound ; curr_weight += adj [ curr_path [ level - 1 ] ] [ i ] ;