Domanda di colloquio di Walmart Global Tech

Coding question which was solved by implementing a stack data structure.