(This question is a variation of the LeetCode question 1268. Search Suggestions System. If you haven't completed that question yet, it is recommended to solve it first.)
Given a list of business names bizNames and a series of prefix queries, implement an efficient search that returns all business names where at least one individual word starts with the given prefix. The match is case-insensitive. For each business name, if the prefix occurs in multiple words, only the first (leftmost) occurrence is considered for sorting.
Ask AI Assistant

Ask AI Assistant
Ask me anything about this coding question!
Test Cases
Input
Output
Expected