17 August 2026
Loudest Word
Easy
Dictionaries
Find the word that repeats the most in a sentence.
Given a sentence of lowercase words separated by single spaces, return the word that appears most often. If several words are tied for the most appearances, return whichever of them appears first in the sentence.
Constraints
1 <= number of words <= 1000Each word contains only lowercase English letterssentence has no leading, trailing, or repeated spaces
Function signature
def loudest_word(sentence):