This is an easy problem. Nothing much to say.
Just pay attention to the edge case, when there the input is AAA, the output should be 0-1, same when the input is AAADDD, etc, the output should also be 0-1.
AAA
0-1
AAADDD
This is again a very basic problem. It just the problme statement is a bit too long. Spend some time understading it.
Last updated 5 months ago