Kindly check the flaw in my code

my test case 0 and test case 1 are failing kindly see my code and tell me my mistakehttps://ide.codingblocks.com/s/447435

Hello @av8055 what it is showing?

test case 0 and 1 are failing and test case 2 is getting passed

@av8055 I mean is it showing wrong answer for these test cases pr what error?

wrong answer is shown in the compile message

I got the solution we had to print the b stack in every iteration thank you

@av8055 so is your doubt clear now?

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.