HedgeServ interview question

They asked me to write a Stack