Geometry LeetCode Problems: All 33, With Python Solutions

Every problem in this library that LeetCode tags Geometry 33 in total, 28 of them with a complete Python solution, a worked example and the time and space complexity of the approach.

  • 33 problems
  • 9 Easy
  • 14 Medium
  • 10 Hard

How Geometry problems are solved

A tag names the subject, not the method. These pattern hubs cover the techniques that actually solve Geometry problems — each one explains the approach, gives a Python template and states its complexity.

  • Math and Number Theory — Find the closed form, the invariant, or the modular identity — and skip the loop entirely.

Geometry problems by difficulty

Problems with a complete Python solution are listed first, then by ascending problem number.

Easy (9)

#ProblemDifficultyTopics
812Largest Triangle AreaEasyGeometry, Array, Math
836Rectangle OverlapEasyGeometry, Math
883Projection Area of 3D ShapesEasyGeometry, Array, Math +1
892Surface Area of 3D ShapesEasyGeometry, Array, Math +1
1030Matrix Cells in Distance OrderEasyGeometry, Array, Math +2
1037Valid BoomerangEasyGeometry, Array, Math
1232Check If It Is a Straight LineEasyGeometry, Array, Math
1266Minimum Time Visiting All PointsEasyGeometry, Array, Math
2481Minimum Cuts to Divide a CircleEasyGeometry, Math

Medium (14)

#ProblemDifficultyTopics
223Rectangle AreaMediumGeometry, Math
478Generate Random Point in a CircleMediumGeometry, Math, Rejection Sampling +1
593Valid SquareMediumGeometry, Math
858Mirror ReflectionMediumGeometry, Math, Number Theory
939Minimum Area RectangleMediumGeometry, Array, Hash Table +2
963Minimum Area Rectangle IIMediumGeometry, Array, Hash Table +1
973K Closest Points to OriginMediumGeometry, Array, Math +4
1401Circle and Rectangle OverlappingMediumGeometry, Math
1828Queries on Number of Points Inside a CircleMediumGeometry, Array, Math
2101Detonate the Maximum BombsMediumDepth-First Search, Breadth-First Search, Graph +3
2249Count Lattice Points Inside a CircleMediumGeometry, Array, Hash Table +2
2280Minimum Lines to Represent a Line ChartMediumGeometry, Array, Math +2
469Convex PolygonPremiumMediumGeometry, Array, Math
2152Minimum Number of Lines to Cover PointsPremiumMediumBit Manipulation, Geometry, Array +5

Hard (10)

#ProblemDifficultyTopics
149Max Points on a LineHardGeometry, Array, Hash Table +1
335Self CrossingHardGeometry, Array, Math
391Perfect RectangleHardGeometry, Array, Hash Table +2
587Erect the FenceHardGeometry, Array, Math
1453Maximum Number of Darts Inside of a Circular DartboardHardGeometry, Array, Math
1515Best Position for a Service CentreHardGeometry, Array, Math +1
1610Maximum Number of Visible PointsHardGeometry, Array, Math +2
1924Erect the Fence IIPremiumHardGeometry, Array, Math
1956Minimum Time For K Virus Variants to SpreadPremiumHardGeometry, Array, Math +2
2613Beautiful PairsPremiumHardGeometry, Array, Math +3

When the Geometry problem arrives live

Stealth Interview is a desktop app for macOS and Windows. It reads the coding problem off your screen, returns a working solution with a step-by-step explanation and its time and space complexity, and transcribes what the interviewer is saying — while staying invisible to screen sharing.