cyclic strings

Question: http://www.codechef.com/TUXO2014/problems/SREENI

My solution: http://www.codechef.com/viewsolution/3716014

I was trying to solve it by rotating the array about each element from 2nd loaction to the last location… But it did not work…Can someone explain why?

Your answer for the test case BBLLAAAAW LLAAAAAWB gives NO while the expected answer in yes. Infact, it gives Wrong Answer for all test cases except for one. Please do check your code once again

@ani94 As per your test case,the answer should be NO since there is just one B…Chek yr test cases