Pregunta de entrevista de Oracle

Implementation of Stack and making it efficient.