Available question text
Find the median of the multiset formed by the number of distinct elements in every subarray of nums — i.e., determine the k-th smallest value of distinct(nums[i..j]) over all O(n^2) subarrays. Key insight: the predicate "number of subarrays with ≤ t distinct elements" is monotone and can be computed with a sliding-window frequency map, enabling a binary search over t to locate the median.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3134. Find the Median of the Uniqueness Array
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source