Minimum Length of String After Deleting Similar Ends
Given a string s consisting only of characters 'a' and 'b', repeatedly remove the characters at the two ends of the string that are the same until the string becomes empty or no such operation can be performed. Return the minimum length of the string after performing the above operations.
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)