Marsh Interview Question

Asked the implementation of stack.