Question d’entretien chez Accenture

How to reverse a stack and write working code?