Search
⌘K

Leetcode 3404. Count Special Subsequences

Count the number of length-4 subsequences (p<q<r<s) with q-p, r-q, s-r >= 2 such that nums[p]*nums[r] == nums[q]*nums[s]. The core challenge is efficiently counting equal pairwise products across index splits while respecting the required spacing (n ≤ 1000, nums[i] ≤ 1000).


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.