Editorial for CCC '15 S1 - Zero That Out


Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.

Author: quantum

This problem is simply implementing a stack which pushes the input onto the stack when non-zero, and pops the top of the stack when zero.

Complexity: \mathcal{O}(N)


Comments

There are no comments at the moment.