Domanda di colloquio di IBM

The SQL was just simple SELECT and GROUP BY, the Python question involves using stacks