Your code is giving WA in that test case.
1 6 ()))() 7 4 6 6 5 0 3 0
Thank you, minor fixes in the code work!
But can you please explain me: http://ideone.com/nbErZV why doesn’t work but http://ideone.com/4435ID works, only changes in these codes are the update method in the query region.
Are you asking for Run-time error or WA in 1st link?
I’m asking about WA! 1st link gives me wrong ans but the 2nd one is AC! only change in 2nd 1 being, I updated the main string then passed the value at pos f-1 as agrument to the update method!
Ok. I will catch you soon. I need time to debug your whole code
No problem! Thank you for helping out!