Tap here to switch tabs
Problem
Submissions

Problem: Smallest Unique Subarray

Smallest Unique Subarray asks you to find the shortest nonempty contiguous segment of an integer array whose exact sequence of values occurs only once in the array.

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

Smallest Unique Subarray asks you to find the shortest nonempty contiguous segment of an integer array whose exact sequence of values occurs only once in the array.

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