Pregunta de entrevista de StackAdapt

Galton Watson Branching Process and DP Programming question