MIND CTI interview question

Simulate a stack