Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 3098. Find the Sum of Subsequence Powers
Compute the sum (mod 1e9+7) of the "power" of every k-element subsequence of nums, where a subsequence's power is the minimum absolute difference between any two of its elements. With n ≤ 50 this requires sorting and combinatorial counting/DP to aggregate each possible gap's contribution efficiently rather than enumerating all subsets.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.