Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
First extract the words of the sentence.
Check for each word if searchWord occurs at index 0, if so return the index of this word (1-indexed)
If searchWord doesn't exist as a prefix of any word return the default value (-1).