3623. Count Number of Trapezoids I
You are given a 2D integer array
points, wherepoints[i] = [xi, yi]represents the coordinates of theithpoint on the Cartesian plane.A horizontal trapezoid is a convex quadrilateral with at least one pair of horizontal sides (i.e. parallel to the x-axis). Two lines are parallel if and only if they have the same slope.
Return the number of unique horizontal\ *trapezoids* that can be formed by choosing any four distinct points from
points.Since the answer may be very large, return it modulo
109 + 7.
1 | class Solution { |