MicroStrategy Interview Question

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