clypd Interview Question

How would you implement the auto-complete feature?