Help Required in Matched Brackets 2 Problem

Hello guys ,

I was solving this ZCO problem ( Matched Brackets 2 ) : https://www.codechef.com/ZCOPRAC/problems/ZCO12003

And I was getting WA , and even after checking for many examples myself in my IDE I am not able to find any fault in this code

My code : https://pastebin.com/EgspfHbK

Can someone plsss help me figure out where I am wrong ?

Thanks a lot !
Sudheera Y S

2 Likes