LTM Limited Interview Question

Basic stack and arrays questions