geometry
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
High-Pressure Round
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.
Rectangle Area
Calculate the total area covered by two rectangles using geometry, handling overlaps and avoiding double counting effici…
Self Crossing
Determine if a path defined by sequential distances on a 2D plane crosses itself using array and math reasoning.
Perfect Rectangle
Determine if given axis-aligned rectangles form a perfect cover using array scanning and hash-based corner counting tech…
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…
Erect the Fence
Find the perimeter fence of a garden by determining the outermost trees in a set of given tree coordinates.
Valid Square
Determine if four given 2D points form a valid square using geometric distance checks and vector validation techniques.
Largest Triangle Area
Find the area of the largest triangle formed by three distinct points on a 2D plane.
Rectangle Overlap
Determine if two axis-aligned rectangles overlap based on their coordinates.
Mirror Reflection
Given a square room with mirrors, find which receptor a laser ray will hit first based on two integers, p and q.
Projection Area of 3D Shapes
Calculate the projection area of a 3D shape defined by a grid of towers with varying heights.
Surface Area of 3D Shapes
Solve the Surface Area of 3D Shapes problem using array manipulation and mathematical formulas to calculate surface area…
Minimum Area Rectangle
Find the minimum area of a rectangle formed by given points on a 2D plane with sides parallel to axes.
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.
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…
Matrix Cells in Distance Order
Compute all matrix cell coordinates sorted by Manhattan distance from a given center using array and math techniques eff…
Valid Boomerang
Determine if three points on a 2D plane form a boomerang, based on distinctness and non-collinearity.
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.
Minimum Time Visiting All Points
Calculate the minimum seconds required to visit all given 2D points in order using optimal diagonal or straight moves.
Circle and Rectangle Overlapping
Determine if a circle intersects with an axis-aligned rectangle using geometric distance checks efficiently in code.
Maximum Number of Darts Inside of a Circular Dartboard
Maximize the number of darts on a circular dartboard given dart positions and radius.
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.
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…
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…
Detonate the Maximum Bombs
Determine the maximum number of bombs that can be detonated by leveraging chain reactions using graph traversal and DFS …
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.
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…
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…
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…
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…
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.
Minimize Manhattan Distances
Compute the minimum maximum Manhattan distance by removing one point using array math and geometry insights efficiently.
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.
Maximum Area Rectangle With Point Constraints I
Find the maximum area of a rectangle formed by given points on a plane with unique coordinates.
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…
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.
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…
Count Number of Trapezoids II
Count Number of Trapezoids II requires scanning point pairs and hashing slopes to efficiently find parallel sides in arr…