Tap here to switch tabs
Problem
Submissions

Problem: Count Integers Appearing in a Single Block

Try to solve the Count Integers Appearing in a Single Block problem.

Statement

You are given an integer array nums.

An integer is considered special if all of its occurrences in nums appear together in a single contiguous block.

Return the total number of distinct special integers in nums.

Constraints:

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

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

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Count Integers Appearing in a Single Block

Try to solve the Count Integers Appearing in a Single Block problem.

Statement

You are given an integer array nums.

An integer is considered special if all of its occurrences in nums appear together in a single contiguous block.

Return the total number of distinct special integers in nums.

Constraints:

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

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