Infosys interview question

Basic stack data structure operations.