My logic is correct but my code is not working properly


please tell the error in my code

Instead of popping two times u should pop until you remove ( bracket