Search Suggestions System
You are given a list of products, where each product is a string. You are also given a searchWord. After each character typed, return the top k suggestions of product names that match the typed prefix.
Each product also has an associated popularity score (Map
You must return suggestions after each character of searchWord. Handle up to 1e5 products and optimize for performance.