Tap here to switch tabs
Problem
Submissions

Problem: Count Common Words With One Occurrence

med
30 min
Try to solve the Count Common Words With One Occurrence problem.

Statement

Given two string arrays words1 and words2, return the number of strings that appear exactly once in words1 and exactly once in words2.

Constraints:

  • 1≤1 \leq words1.length, words2.length ≤1000\leq 1000

  • 1≤1 \leq words1[i].length, words2[j].length ≤30\leq 30

  • words1[i] and words2[j] consist only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Common Words With One Occurrence

med
30 min
Try to solve the Count Common Words With One Occurrence problem.

Statement

Given two string arrays words1 and words2, return the number of strings that appear exactly once in words1 and exactly once in words2.

Constraints:

  • 1≤1 \leq words1.length, words2.length ≤1000\leq 1000

  • 1≤1 \leq words1[i].length, words2[j].length ≤30\leq 30

  • words1[i] and words2[j] consist only of lowercase English letters.