mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
* feat(geometry): add Bentley-Ottmann line segment intersection algorithm - Implement sweep-line algorithm for finding all intersection points - Time complexity: O((n + k) log n) where n is segments, k is intersections - Uses event queue (PriorityQueue) and status structure (TreeSet) - Handles vertical/horizontal segments, collinear overlaps, and touching endpoints - Includes comprehensive Javadoc with examples and references * test(geometry): add comprehensive tests for Bentley-Ottmann algorithm - 19 test cases covering typical, edge, and degenerate cases - Tests include: single/multiple intersections, parallel segments, grid patterns - Performance test with 100 random segments - All tests validate correctness of intersection detection * style(geometry): fix code style * test(geometry): Achieve 100% test coverage for BentleyOttmann * style(geometry): fix code style again * fix: correct import order in BentleyOttmann * fix(geometry): Resolve SpotBugs and PMD static analysis warnings * Reorder import statements in BentleyOttmannTest --------- Co-authored-by: Deniz Altunkapan <deniz.altunkapan@outlook.com>