Split a string of a's and b's with at most 2 cuts so Alice and Bob get equal letter counts.
Unlock detailed company stats for this questionUpgrade
Given a string consisting of only the letters 'a' and 'b', where the number of 'a' and the number of 'b' are both even, you can make at most 2 cuts and divide the resulting substrings between Alice and Bob so that Alice and Bob each get the same number of 'a' and the same number of 'b'. Return the index or indices of the cut(s).
Community answers
No answers contributed by the community yet.


