Pergunta de entrevista da empresa Bazaarvoice

something to do with a math algorithm on contiguous sets