Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Try generating all possible subarrays and check for the number of unique integers. Increment the count accordingly.
How about using a map to store the count of integers?
Think about the Sliding Window and 2-pointer approach.