Kernighan-Lin.cpp
bool check_if_edge_exists(vector<pair<int,int> >el,int v1,int v2){
	for (int i=0;i<el.size();i++){
		if((el[i].first==v1 && el[i].second == v2 )|| (el[i].first==v2 && el[i].second==v1)) {
			return true;
		}
	}
	return false;
}
// function to check if an edge exists in the Graph if vertices are given
// return true if edge exists
function to check if an edge exists in the Graph if vertices are given
return true if edge exists
function to check if an edge exists in the Graph if vertices are given return true if edge exists
bool check_if_edge_exists(vector<pair<int,int> >el,int v1,int v2){
	for (int i=0;i<el.size();i++){
		if((el[i].first==v1 && el[i].second == v2 )|| (el[i].first==v2 && el[i].second==v1)) {
			return true;
		}
	}
	return false;
}
bool check_if_edge_exists ( vector < pair < int , int > > el , int v1 , int v2 ) { for ( int i = 0 ; i < el . size ( ) ; i ++ ) { if ( ( el [ i ] . first == v1 && el [ i ] . second == v2 ) || ( el [ i ] . first == v2 && el [ i ] . second == v1 ) ) { return true ; } } return false ; }
function to check if an edge exists in the Graph if vertices are given
return true if edge exists
function to check if an edge exists in the Graph if vertices are given return true if edge exists