ADJFLIP problem help

include <bits/stdc++.h>
define mod 1000000007
define mp make_pair
define pb push_back
define pi pair<int, int>
define pip pair<int,pi>
define pl pair<ll,ll>
define plp pair<ll,pl>
define vi vector
define vl vector
define lb lower_bound // First element NOT LESS than val
define ub upper_bound // First element GREATER than val
define sz(q) (int)(q.size())
define debug(a) cout << #a << " " << a << endl;
using namespace std;
typedef long long int ll;
typedef long int li;
define fo(a,b) for(auto i=a;i<b;++i)
define nfo(a,b) for(auto i=a;i>=b;–i)
define jfo(a,b) for(auto j=a;j<b;++j)
define njfo(a,b) for(auto j=a;j>=b;–j)

bool checkOne(string s, int n)
{

int cnt = 0;
if(s[0] == '1') cnt++;
for(int i = 1; i < n; i++)
{
    if(s[i] == '1') cnt++;
    else{
        if(cnt%2 == 1) return false;
        cnt = 0;
    }
}
if(cnt == n) return true;
if(cnt%2 == 0) return true;
return false;

}

bool checkZero(string s, int n)
{

int cnt = 0;
if(s[0] == '0') cnt++;
for(int i = 1; i < n; i++)
{
    if(s[i] == '0') cnt++;
    else{
        if(cnt%2 == 1) return false;
        cnt = 0;
    }
}
if(cnt == n) return true;
if(cnt%2 == 0) return true;
return false;

}

void solve()
{

int n;
string s;
cin >> n;
cin >> s;
if(n == 1)
{
    cout << "Yes\n";
    return;
}
int flag1 = checkZero(s, n), flag2 = checkOne(s, n);
if((flag2) || (flag1))
{
    cout << "Yes\n";
}
else cout << "No\n";

}

int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);

int t;
cin >> t;

while(t--)
{
    solve();
}
return 0;

}

this is my code i am just checking is it possible to convert all characters to ones or zeroes , to convert all character to zeroes , find no of adjacent 1’s size if they are size is odd we can’t change them, but if it is even we can,
my code failing for second testcase, can any give any testcase which it is failing