Prateek sir and coding doubt

https://ide.codingblocks.com/s/63630
I am wrong answer for first two test cases

@hardik.somani02 your while loop is not write I have corrected your code you can refer this.

What changes did you made?

your push statement is out of loop check

Hi Hardik, your q-- statement is not placed correctly. It should be after the if block. You can refer to the correct code here: https://ide.codingblocks.com/s/63755

prateek sir and coding ???
what is the error…its showing only one output