Each rectangle is [x1, y1, x2, y2], with (x1, y1) the bottom-left corner and (x2, y2) the top-right corner. Return the total area covered by at least one rectangle, counting overlaps once, modulo 1000000007.
- Coordinates are integers from
0 to 109, so the true area can reach 1018, past what a Number stores exactly - Rectangles can overlap, nest, touch or repeat; an empty list gives
0 - Do not change the input
- Target: O(n log n) with a sweep and a segment tree over the compressed y coordinates; an O(n²) slab-by-slab version is a fine first step