DJ Party (keteki)

Please explain this question, im not able to get it!!!

I wasn’t able to either at first. The wording is vague.

In one second, you have to swap all i and i+1 where a_i=G and a_{i+1}=L. Do this t times.

bro thankyou, but i didnt understand the question, sorry

I’ll tell you the question shortly:

You are given an array a which has characters G or L. For t times, swap all i where a_i=G and a_{i+1}=L.

The inputs given are n, t and an array a.

Print how the array will look like after you apply the process described above.