Longest Bigram

A bigram is a pair of consecutive words. Given a string, return the longest bigram in that string. Include the space between the words. Assume there will be no punctuation. In the case of a tie, return the earlier bigram.

E.g., longest_bigram("One must have a mind of winter") => "must have"

results matching ""

    No results matching ""