← ALL NOTES
Array

3583. Count Special Triplets

Given an array nums. Find the number of "special" index triplets i<j<l where nums[i]==2·nums[j] and nums[l]==2·nums[j] (both ends equal twice the center). Modulo 1e9+7.

Loading…