You are given an array of positive integers nums.
A partition of an array into one or more contiguous subarrays is considered good if no two distinct subarrays contain the same value.
Return the total number of good partitions of nums. Since the answer may be very large, return it modulo
Constraints:
nums.length
nums[i]
You are given an array of positive integers nums.
A partition of an array into one or more contiguous subarrays is considered good if no two distinct subarrays contain the same value.
Return the total number of good partitions of nums. Since the answer may be very large, return it modulo
Constraints:
nums.length
nums[i]