Tap here to switch tabs
Problem
Submissions

Problem: Check if Any Element Has Prime Frequency

med
30 min
Try to solve the Check if Any Element Has Prime Frequency problem.

Statement

Given an integer array nums, determine whether there exists at least one element whose frequency of occurrence in nums is a prime number.

Return true if at least one such element exists, and false otherwise.

Note: A prime number is an integer strictly greater than 11 that has no positive divisors other than 11 and itself.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 0≤0 \leq nums[i] ≤100\leq 100

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Check if Any Element Has Prime Frequency

med
30 min
Try to solve the Check if Any Element Has Prime Frequency problem.

Statement

Given an integer array nums, determine whether there exists at least one element whose frequency of occurrence in nums is a prime number.

Return true if at least one such element exists, and false otherwise.

Note: A prime number is an integer strictly greater than 11 that has no positive divisors other than 11 and itself.

Constraints:

  • 1≤1 \leq nums.length ≤100\leq 100

  • 0≤0 \leq nums[i] ≤100\leq 100