My issue
give me hint for this problem
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--)
{
int n;
cin>>n;
char arr[n];
for(int i=0;i<n;i++)
{
cin>>arr[i];
}
int count=1;
for(int i=0;i<n;i++)
{
if(arr[i]==arr[i+1])
{
count++;
}
}
cout<<count<<endl;
}
}
Problem Link: Empty the String Practice Coding Problem