LeetCodechevron_rightCategorieschevron_rightgeometry
hexagon

geometry

38 problems
Easy: 9Medium: 17Hard: 12

geometry is one of the most repeated interview dimensions. Start with edge-safe fundamentals, then move into pattern-level trade-offs.

Interview Signal

Frequently tests problem modeling, edge handling, and verbal clarity.

Common Pitfall

Template-only answers break under follow-up questioning.

Practice Strategy

Practice in 3-5 problem rounds and always review complexity alternatives.

Recommended Progression

#TitleDifficulty
149

Max Points on a Line

Find the maximum number of points on a straight line in a 2D plane using array scanning and hash lookup.

Hard
223

Rectangle Area

Calculate the total area covered by two rectangles using geometry, handling overlaps and avoiding double counting effici…

Medium
335

Self Crossing

Determine if a path defined by sequential distances on a 2D plane crosses itself using array and math reasoning.

Hard
391

Perfect Rectangle

Determine if given axis-aligned rectangles form a perfect cover using array scanning and hash-based corner counting tech…

Hard
478

Generate Random Point in a Circle

Generate Random Point in a Circle requires creating a uniform random point inside a circle using math and geometry princ…

Medium
587

Erect the Fence

Find the perimeter fence of a garden by determining the outermost trees in a set of given tree coordinates.

Hard
593

Valid Square

Determine if four given 2D points form a valid square using geometric distance checks and vector validation techniques.

Medium
812

Largest Triangle Area

Find the area of the largest triangle formed by three distinct points on a 2D plane.

Easy
836

Rectangle Overlap

Determine if two axis-aligned rectangles overlap based on their coordinates.

Easy
858

Mirror Reflection

Given a square room with mirrors, find which receptor a laser ray will hit first based on two integers, p and q.

Medium
883

Projection Area of 3D Shapes

Calculate the projection area of a 3D shape defined by a grid of towers with varying heights.

Easy
892

Surface Area of 3D Shapes

Solve the Surface Area of 3D Shapes problem using array manipulation and mathematical formulas to calculate surface area…

Easy
939

Minimum Area Rectangle

Find the minimum area of a rectangle formed by given points on a 2D plane with sides parallel to axes.

Medium
963

Minimum Area Rectangle II

Find the minimum area rectangle from given points in the X-Y plane, with sides not necessarily parallel to the axes.

Medium
973

K Closest Points to Origin

Find the k closest points to the origin in a 2D plane using array operations and Euclidean distance calculations efficie…

Medium
1030

Matrix Cells in Distance Order

Compute all matrix cell coordinates sorted by Manhattan distance from a given center using array and math techniques eff…

Easy
1037

Valid Boomerang

Determine if three points on a 2D plane form a boomerang, based on distinctness and non-collinearity.

Easy
1232

Check If It Is a Straight Line

Determine if a series of coordinates form a straight line on a 2D plane using geometry and mathematical principles.

Easy
1266

Minimum Time Visiting All Points

Calculate the minimum seconds required to visit all given 2D points in order using optimal diagonal or straight moves.

Easy
1401

Circle and Rectangle Overlapping

Determine if a circle intersects with an axis-aligned rectangle using geometric distance checks efficiently in code.

Medium
1453

Maximum Number of Darts Inside of a Circular Dartboard

Maximize the number of darts on a circular dartboard given dart positions and radius.

Hard
1515

Best Position for a Service Centre

Find the optimal service center position in a city by minimizing the sum of Euclidean distances to all customers.

Hard
1610

Maximum Number of Visible Points

Determine the maximum number of points visible from a fixed location within a given angle using a sliding window approac…

Hard
1828

Queries on Number of Points Inside a Circle

Determine how many 2D points lie within multiple circles using array iteration and Euclidean distance calculations effic…

Medium
2101

Detonate the Maximum Bombs

Determine the maximum number of bombs that can be detonated by leveraging chain reactions using graph traversal and DFS …

Medium
2249

Count Lattice Points Inside a Circle

Count the number of lattice points inside at least one circle in a grid, based on given center and radius data.

Medium
2280

Minimum Lines to Represent a Line Chart

Determine the fewest lines needed to accurately connect stock price points in a line chart using array and math reasonin…

Medium
2481

Minimum Cuts to Divide a Circle

Calculate the fewest cuts required to divide a circle into n equal slices using math and geometric reasoning efficiently…

Easy
3025

Find the Number of Ways to Place People I

Calculate how many valid pairs of points can be formed on a 2D plane using array and math enumeration techniques efficie…

Medium
3027

Find the Number of Ways to Place People II

Calculate all valid placements of people on a 2D grid ensuring Alice can fence herself with Bob without enclosing others…

Hard
3047

Find the Largest Area of Square Inside Two Rectangles

Find the largest square area that can fit inside the intersection of two or more rectangles in a 2D plane.

Medium
3102

Minimize Manhattan Distances

Compute the minimum maximum Manhattan distance by removing one point using array math and geometry insights efficiently.

Hard
3235

Check if the Rectangle Corner Is Reachable

Determine if there is a valid path from the bottom-left to top-right of a rectangle while avoiding circles.

Hard
3380

Maximum Area Rectangle With Point Constraints I

Find the maximum area of a rectangle formed by given points on a plane with unique coordinates.

Medium
3382

Maximum Area Rectangle With Point Constraints II

Find the largest rectangle on a plane using given points while avoiding any interior points and optimizing with math and…

Hard
3588

Find Maximum Area of a Triangle

Find the maximum area of a triangle from 2D coordinates with at least one side parallel to the x-axis or y-axis.

Medium
3623

Count Number of Trapezoids I

Given a list of distinct points, count the number of unique horizontal trapezoids that can be formed by selecting four p…

Medium
3625

Count Number of Trapezoids II

Count Number of Trapezoids II requires scanning point pairs and hashing slopes to efficiently find parallel sides in arr…

Hard

Related Patterns

Geometry LeetCode Problems: 38 Solutions