Tap here to switch tabs
Problem
Submissions

Problem: Count Values With Equally Spaced Occurrences I

Try to solve the Count Values With Equally Spaced Occurrences I problem.

Statement

You are given an integer array nums.

An integer is considered special if:

  • It appears in nums exactly 33 times.

  • The indices i1<i2<i3i_1 < i_2 < i_3 of its three occurrences are equally spaced, such that i2−i1=i3−i2i_2 - i_1 = i_3 - i_2.

Return the number of special integers present in nums.

Constraints:

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

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

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Values With Equally Spaced Occurrences I

Try to solve the Count Values With Equally Spaced Occurrences I problem.

Statement

You are given an integer array nums.

An integer is considered special if:

  • It appears in nums exactly 33 times.

  • The indices i1<i2<i3i_1 < i_2 < i_3 of its three occurrences are equally spaced, such that i2−i1=i3−i2i_2 - i_1 = i_3 - i_2.

Return the number of special integers present in nums.

Constraints:

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

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