Pregunta de entrevista de Freshworks

How to reverse a stack?