Search
⌘K

Leetcode 3009. Maximum Number of Intersections on the Chart

Given multiple series plotted over the same x-coordinates, compute the maximum number of pairwise intersections among the piecewise-linear lines formed by connecting points across x — essentially counting line crossings between adjacent x-columns. This requires efficiently counting inversions/crossings (sweep-line, BIT/segment-tree or order-statistic structure) to handle large inputs.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Mid November, 2025

Meta

Senior

Comments

Your account is free and you can post anonymously if you choose.