Amazon Interview Question

Write a Stack, unexpected.