Tap here to switch tabs
Problem
Submissions

Problem: Find the Median of the Uniqueness Array

med
30 min
Try to solve the Find the Median of the Uniqueness Array problem.

Statement

You are given an integer array nums. The uniqueness array of nums is a collection containing the number of distinct elements present in every non empty contiguous subarray of nums, sorted in ascending order.

Return the median of the uniqueness array of nums.

Note: The median of an array of size kk is the element located at index ⌊(k−1)/2⌋\lfloor (k - 1) / 2 \rfloor when sorted in nondecreasing order using 00 based indexing.

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: Find the Median of the Uniqueness Array

med
30 min
Try to solve the Find the Median of the Uniqueness Array problem.

Statement

You are given an integer array nums. The uniqueness array of nums is a collection containing the number of distinct elements present in every non empty contiguous subarray of nums, sorted in ascending order.

Return the median of the uniqueness array of nums.

Note: The median of an array of size kk is the element located at index ⌊(k−1)/2⌋\lfloor (k - 1) / 2 \rfloor when sorted in nondecreasing order using 00 based indexing.

Constraints:

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

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