ML Engineer MasterClass (April) | 6 seats left

Generating Functions and Recursions

Generating Functions and Recursions

Generating Functions and Recursions

Most candidates who get asked "what's the expected number of fair coin flips to see HH?" start conditioning on the first flip, write out a system of equations, and then stall. The algebra turns into a mess of $E_0$, $E_1$, $E_2$ variables that all depend on each other, and somewhere around the third substitution, they lose the thread. Generating functions cut through all of that.

Unlock the full lesson

Created by interviewers from Google and Meta. Master every concept you need to land your dream role.

All courses — Data, ML/AI & Quant
Unlimited coding submissions
Hands-on projects with real datasets
Detailed solutions in text & video
Monthly content updates
Join Premium