You are given a string containing characters A and B only. Your task is to change it into a string such that there are no matching adjacent characters. To do this, you are allowed to delete zero or more characters in the string.

Your task is to rearrange the code to find the minimum number of required deletions.

  
Your score is:       
Copy paste the above completed code in below IDE and run