🤖 AI Summary
This paper addresses the problem of computing a maximum-area inscribed triangle in a terrain—specifically, an x-monotone polygon whose lower boundary is a line segment. To overcome the quadratic-time bottleneck of prior O(n²) algorithms, we present the first exact near-linear-time algorithm with O(n log n) time complexity. Methodologically, we exploit the x-monotonicity of the terrain via monotone chain decomposition, divide-and-conquer pruning, and an enhanced rotating calipers technique to avoid exhaustive enumeration; additionally, we integrate plane-sweep and event-driven optimizations to reduce constant factors. Our contribution establishes a theoretical breakthrough in asymptotic optimality: the time complexity improves upon the previous best result by more than two orders of magnitude. Extensive experiments on both synthetic and real-world terrain datasets confirm the algorithm’s efficacy and robustness.