#3134

Find the Median of the Uniqueness Array

international master · 1985 · lc hard +32 · 29.9% accepted · 177 likes · top 7%

Description

Given an integer array nums, its uniqueness array is the sorted list of distinct-element counts across all subarrays. Return the median of the uniqueness array, choosing the smaller value when two middle elements exist.

Code

1
2
3