Leetcode 3625. Count Number of Trapezoids II
Count the number of 4-point subsets that form a trapezoid — i.e., a convex quadrilateral with at least one pair of parallel sides — from up to 500 distinct points. The core challenge is combinatorially counting pairs of disjoint point-segments with the same slope (parallel sides) while excluding degenerate/overlapping cases, typically done by grouping point-pairs by reduced slope in O(n^2) time.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Your account is free and you can post anonymously if you choose.