Pregunta de entrevista de Google

What are the stack and queue used for?