Pregunta de entrevista de Google

Q was based on 2 heaps