Tap here to switch tabs
Problem
Submissions

Problem: Report Spam Message

med
30 min
Try to solve the Report Spam Message problem.

Statement

You are given an array of strings message and an array of strings bannedWords.

An array message is considered spam if at least 22 of its words appear in bannedWords.

Return true if message is spam, and false otherwise.

Constraints:

  • 1≤1 \leq message.length, bannedWords.length ≤105\leq 10^5

  • 1≤1 \leq message[i].length, bannedWords[i].length ≤15\leq 15

  • message[i] and bannedWords[i] consist only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Report Spam Message

med
30 min
Try to solve the Report Spam Message problem.

Statement

You are given an array of strings message and an array of strings bannedWords.

An array message is considered spam if at least 22 of its words appear in bannedWords.

Return true if message is spam, and false otherwise.

Constraints:

  • 1≤1 \leq message.length, bannedWords.length ≤105\leq 10^5

  • 1≤1 \leq message[i].length, bannedWords[i].length ≤15\leq 15

  • message[i] and bannedWords[i] consist only of lowercase English letters.