i m unable to understand this question, can u expalin this question?
Bracket sequences
hello @Sagarjha07
in this problem u need to print the number of positions in given string,such that after rotation from that position string becomes balanced.
for example ->
consider 1 based indexing
)()()(
here if i rotate string from position 2 then string will become ()()() (which is balanced)
similarly
if i rotate string from position 4 then string will become ()()() (which is balanced)
if i rotate string from position 6 then string will become ()()() (which is balanced)
so total 3 such position exist therefore answer should be 3.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.