Return the best match for each query word using exact, case-insensitive, and vowel-insensitive matching rules.
You are given a wordlist and a list of query words. For each query, return the first word from the wordlist that matches according to the following priority:
a, e, i, o, u) with a placeholder.If multiple words could match, return the one that appears earliest in the wordlist. If no word matches, return an empty string.
Build a checker that processes every query independently using these rules.
wordlist of strings.queries of strings.For each query, apply the matching rules in priority order and return the chosen word or an empty string.
i-th string is the answer for queries[i].1 <= wordlist.length, queries.length <= 5000wordlist.Example 1
Input
wordlist = ["KiTe","kite","hare","Hare"], queries = ["kite","Kite","KiTe","Hare","HARE","Hear","hear","keti","keet","keto"]
Output
["kite","KiTe","KiTe","Hare","hare","","","KiTe","","KiTe"]
Explanation
Example 2
Input
wordlist = ["yellow"], queries = ["YALLOW","yellow","yellOw"]
Output
["yellow","yellow","yellow"]
Explanation
The lowercase-vowel-normalized form of all queries matches yellow, and the exact/case-insensitive matches also resolve to yellow.
Premium problem context
Premium adds guided hints, editorial links, similar variants, discussion resources, and concept maps so you can understand why a problem matters, not just solve it once.