Minimum Deletions to Make String Balanced
Given a string s consisting only of characters 'a' and 'b', you can delete any number of characters in s to make it balanced. A string is balanced if there are no mismatched adjacent characters. Return the minimum number of deletions needed.
Ada AI
I want to discuss a solution
Help me solve this
Give more examples
What's wrong with my code?
How to use 'for loop' in javascript?
javascript (node 13.12.0)