Question d’entretien chez Incedo

Two puzzles were asked. Stack and Queue basic