Geometry LeetCode Problems: All 33,
With Python Solutions

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

Easy
9
Medium
14
Hard
10
1 pattern

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.

Eyes only

When the Geometry problem arrives live.

In the live round, Stealth Interview reads the 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 says. It's a desktop app for macOS and Windows, invisible to screen sharing.

Geometry problems by difficulty

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

Easy (9)

Easy problems
No.Problem
0812Largest Triangle Area
0836Rectangle Overlap
0883Projection Area of 3D Shapes
0892Surface Area of 3D Shapes
1030Matrix Cells in Distance Order
1037Valid Boomerang
1232Check If It Is a Straight Line
1266Minimum Time Visiting All Points
2481Minimum Cuts to Divide a Circle

Medium (14)

Medium problems
No.Problem
0223Rectangle Area
0478Generate Random Point in a Circle
0593Valid Square
0858Mirror Reflection
0939Minimum Area Rectangle
0963Minimum Area Rectangle II
0973K Closest Points to Origin
1401Circle and Rectangle Overlapping
1828Queries on Number of Points Inside a Circle
2101Detonate the Maximum Bombs
2249Count Lattice Points Inside a Circle
2280Minimum Lines to Represent a Line Chart
0469Convex PolygonPremium
2152Minimum Number of Lines to Cover PointsPremium

Hard (10)

Hard problems
No.Problem
0149Max Points on a Line
0335Self Crossing
0391Perfect Rectangle
0587Erect the Fence
1453Maximum Number of Darts Inside of a Circular Dartboard
1515Best Position for a Service Centre
1610Maximum Number of Visible Points
1924Erect the Fence IIPremium
1956Minimum Time For K Virus Variants to SpreadPremium
2613Beautiful PairsPremium