How did so many people get D right ? more than 2000 ppl got AC, just curious, my Approach was F[i] be the answer if string starts from i,
if(str[i]==str[i+1])
F[i] = F[j] + 1
where j is the first index diff from i,
else
F[i] = F[i+2] + 1
, this approach though wrong, seemed extremely obvious, so those who sovled it in contest did you land on the right approach initially itself, or did you land on the above mentioned approach then realized it's wrong and then moved on ?