Domanda di colloquio di Goldman Sachs

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