You are given an array of strings
message
and an array of stringsbannedWords
.An array of words is considered spam if there are at least two words in it that exactly match any word in
bannedWords
.Return
true
if the arraymessage
is spam, andfalse
otherwise.
1 | class Solution { |