BackmediumArrays arrays medium

Distinct Intensity Counts Solution

Problem Statement

You are given an array of integers `intensities` representing signal strengths. Determine the number of unique signal strengths in the given sequence.

Example 1
Input
[1, 2, 2, 3, 4, 4, 5]
Output
5

Explanation: The unique signal strengths are 1, 2, 3, 4, and 5.

Constraints

  • 1 <= intensities.length <= 10^5
  • -10^6 <= intensities[i] <= 10^6
  • intensities contains at least one integer
Live Compiler
Loading...
Test Cases & Output
🔒 Sign up to run your code

🚀 Practice this problem

Run code, get AI hints & track streak

Sign Up Free