Search
⌘K

Leetcode 1078. Occurrences After Bigram

Given a space-separated text and two words first and second, find every word that immediately follows the bigram "first second" — i.e., split the text and for each index where words[i]==first and words[i+1]==second, collect words[i+2].


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.