Pregunta de entrevista de PolyAI

How would you implement predictive autocomplete for a string?