MicroStrategy interview question

Coding question: Minimum Number of Swaps to Make the String Balanced