Frage im Vorstellungsgespräch bei Incedo

Two puzzles were asked. Stack and Queue basic