Ethan Lape HW 1 turn in

I think that isn't quite what they are getting at. If you push when you see +1 and pop when you see -1, then it is a Dyck work iff you never tried to pop an empty stack.