int balancedStringSplit(char * s){
int count=0,num = 0;
for (int i=0; i<=strlen(s); i++)
{
(s[i] == 'R') ? count++:count--;
if (!count) num++;
}
return num;
}
int balancedStringSplit(char * s){
int count=0,num = 0;
for (int i=0; i<=strlen(s); i++)
{
(s[i] == 'R') ? count++:count--;
if (!count) num++;
}
return num;
}