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.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.