Pergunta de entrevista da empresa Goldman Sachs

An expected value question from Brainstellar, based on writing a recurrence relation and solving it.