Minimum String Length After Balanced Removals
Track a running a-minus-b balance; the letters left over after balanced removals are exactly the final imbalance.
Track a running a-minus-b balance; the letters left over after balanced removals are exactly the final imbalance.