JTG interview question

Basic stack and string questions