Pregunta de entrevista de Google

Implement a function to sample from a multinomial distribution efficiently.

Respuesta de la entrevista

Anónimo

11 mar 2025

Use alias sampling method for O(1) lookup and O(n) preprocessing.