Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 1621. Number of Sets of K Non-Overlapping Line Segments
Count the number of ways to choose exactly k non-overlapping line segments on n collinear integer points (points 0..n-1), where each segment covers at least two points, segments may share endpoints, and the answer is modulo 1e9+7. This is typically solved with dynamic programming / combinatorics over positions and segments (n ≤ 1000, k ≤ n−1).
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.