Pergunta de entrevista da empresa Google

What are the stack and queue used for?