Capgemini interview question

Write your own stack class