Microsoft Interview Question

a problem that required using a stack