Computational Math - rFronteddu/general_wiki GitHub Wiki
Common problems:
- geometry formulas
- interval overlap
- prefix sums / area decomposition
- sweep line
- segment tree / union intervals
- rectangle counting
Easy (Foundational Geometry / Math)
- Rectangle Overlap - Check if rectangles intersect, bounding box logic, axis-aligned intersection
- Largest Triangle Area - shoelace
- Projection Area of 3D Shapes - grid geometry
- Count Lattice Points Inside a Circle area decomposition, distance formula
Medium (Important Interview Patterns)
- Rectangle Area - area decomposition, intersection math, area(A) + area(B) − overlap
- Minimum Area Rectangle - hashing + geometry, rectangle detection
- Minimum Area Rectangle II - vector geometry, dot products, rotated rectangles
- Random Point in Non-overlapping Rectangles - prefix sums, weighted random, geometry
- Max Sum of Rectangle No Larger Than K - 2D prefix sums, ordered set
Hard (Advanced Geometry / Sweep Line)
- Perfect Rectangle - corner counting, area verification, hash set
- Rectangle Area II - line sweep, segment tree, union of intervals
- The Skyline Problem - line sweep, heap, events
- Amount of New Area Painted Each Day - interval union, segment tree, sweep line
- Falling Squares - segment tree, coordinate compression, range max
- Maximum White Tiles Covered by a Carpet - interval sweep, two pointers