DOUBT ON TESTCASE - "0 1 0 0 1 0 0 1 1 0 1" -> How to solve ?
\n# Testcase : "0 1 0 0 1 0 0 1 1 0 1"\nCurrent : "0 1 0 0 1 0 0 1 1 0 1"\nshifting 1 character to the end : 0 1 0 (0) 1 0 0 1 1 0 1 -> 0 1 0 1 0 0 1 1 0 1 0 \n
\n# Testcase : "0 1 0 0 1 0 0 1 1 0 1"\nCurrent : "0 1 0 0 1 0 0 1 1 0 1"\nshifting 1 character to the end : 0 1 0 (*0*) 1 0 0 1 1 0 1 -> 0 1 0 1 0 0 1 1 0 1 0 \nCurrent : 0 1 0 1 0 0 1 1 0 1 0  \nshifting\t :\t\t   0 1 0 1 0 (*0*) 1 1 0 1 0 -> 0 1 0 1 0  1 1 0 1 0 0\nCurrent : 0 1 0 1 0 1 1 0 1 0 0\nShifting : 0 1 0 1 0 1 (*1*) 0 1 0 0 -> 0 1 0 1 0 1 0 1 0 0 1\ncurrent : 0 1 0 1 0 1 0 1 0 0 1\nShifting : 0 1 0 1 0 1 0 1 0 (*0*) 1 -> 0 1 0 1 0 1 0 1 0 1 0 \n\nThe string has become alternating and total swaps are 0 \nbut the output says its 2 \nHow is it possible ? \n\n\n
['Dynamic Programming', 'Greedy', 'Swift', 'C', 'Python', 'C++', 'Java']