AT&T Interview Question

apply a stack with an array