Pergunta de entrevista da empresa Texas Instruments

Q. How to reverse a stack? Optimize It.