#1268 - Search Suggestions System
Given an array of products and a searchWord, after each character of searchWord is typed, return a list of at most 3 product suggestions that have the typed prefix. Suggestions should be lexicographically sorted.
| Input | Output |
|---|---|
products = ["mobile","mouse","moneypot","monitor","mousepad"], searchWord = "mouse" | [["mobile","moneypot","monitor"],["mobile","moneypot","monitor"],["mouse","mousepad"],["mouse","mousepad"],["mouse","mousepad"]] |