Prefix Matching in Sentence

Given a sentence sentence and a search word searchWord, return the 1-indexed position of the first word that starts with the entire searchWord. A matching prefix must begin at the start of a word; a substring appearing later in a word does not count. A word exactly equal to searchWord matches. Return -1 if no word matches.

The sentence contains lowercase English letters separated by single spaces. It has no leading, trailing or repeated spaces. Matching is case-sensitive.

Examples
Input: ["i love eating burger","burg"]
Output: 4
Hints

Prefix Matching in Sentence

Given a sentence `sentence` and a search word `searchWord`, return the 1-indexed position of the first word that starts with the entire `searchWord`. A matching prefix must begin at the start of a word; a substring appearing later in a word does not count. A word exactly equal to `searchWord` matches. Return -1 if no word matches.