You are given an array of positive integers nums.
A quadruplet of indices (p, q, r, s) is called a special subsequence if:
nums.length
nums[p] nums[r] == nums[q] nums[s]
Return the total number of special subsequences in nums.
Constraints:
nums.length
nums[i]
You are given an array of positive integers nums.
A quadruplet of indices (p, q, r, s) is called a special subsequence if:
nums.length
nums[p] nums[r] == nums[q] nums[s]
Return the total number of special subsequences in nums.
Constraints:
nums.length
nums[i]