Question
A chat spam filter flags messages that are just one word repeated over and over. Given a message of words separated by single spaces (possibly empty), return True if the message consists of the same word repeated three or more times when compared case-insensitively, and False otherwise. For example, 'buy BUY buy' is spam, but 'buy buy' (only twice) and 'hello hello hello world' are not.
is_word_spam(message: str) → bool["buy BUY buy"]outtrueState your approach and its time/space complexity out loud before you optimize. Handle the edge cases (empty input, duplicates, overflow), and say why you chose this over the brute force. Green tests are the floor, not the grade.
Vibe coding: describe the solution in plain language (or narrate it) and the coach grades your approach. Generating runnable code from your description is coming next.