Tap here to switch tabs
Problem
Submissions

Problem: Smallest Unique Subarray

med
30 min
Try to solve the Smallest Unique Subarray problem.

Statement

Given an integer array nums, determine the minimum length of a subarray that appears exactly once in nums.

A subarray is a contiguous non empty sequence of elements within an array.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Smallest Unique Subarray

med
30 min
Try to solve the Smallest Unique Subarray problem.

Statement

Given an integer array nums, determine the minimum length of a subarray that appears exactly once in nums.

A subarray is a contiguous non empty sequence of elements within an array.

Constraints:

  • 1≤1 \leq nums.length ≤105\leq 10^5

  • 1≤1 \leq nums[i] ≤105\leq 10^5