You are given an integer array nums.
The distinct count of a subarray is defined as the number of unique elements present in that subarray.
Return the sum of the squares of distinct counts across all contiguous subarrays of nums.
Constraints:
nums.length
nums[i]
You are given an integer array nums.
The distinct count of a subarray is defined as the number of unique elements present in that subarray.
Return the sum of the squares of distinct counts across all contiguous subarrays of nums.
Constraints:
nums.length
nums[i]