题库chevron_right分类chevron_right几何
hexagon

几何

38 道题目
简单: 9中等: 17困难: 12

几何 是技术面试里最常出现的能力维度之一。建议先掌握基础题型的边界处理,再逐步过渡到模式识别和复杂度 trade-off。

面试场景

高频考察问题建模、边界条件与口头表达的清晰度。

常见误区

只背模板不解释为什么,容易在追问里失分。

练习策略

每轮练 3-5 题,固定复盘复杂度和可替代解法。

推荐练习顺序

#题目难度
149

直线上最多的点数

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

困难
223

矩形面积

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

中等
335

路径交叉

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

困难
391

完美矩形

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

困难
478

在圆内随机生成点

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

中等
587

安装栅栏

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

困难
593

有效的正方形

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

中等
812

最大三角形面积

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

简单
836

矩形重叠

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

简单
858

镜面反射

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

中等
883

三维形体投影面积

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

简单
892

三维形体的表面积

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

简单
939

最小面积矩形

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

中等
963

最小面积矩形 II

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

中等
973

最接近原点的 K 个点

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

中等
1030

距离顺序排列矩阵单元格

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

简单
1037

有效的回旋镖

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

简单
1232

缀点成线

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

简单
1266

访问所有点的最小时间

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

简单
1401

圆和矩形是否有重叠

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

中等
1453

圆形靶内的最大飞镖数量

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

困难
1515

服务中心的最佳位置

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

困难
1610

可见点的最大数目

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

困难
1828

统计一个圆中点的数目

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

中等
2101

引爆最多的炸弹

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

中等
2249

统计圆内格点数目

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

中等
2280

表示一个折线图的最少线段数

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

中等
2481

分割圆的最少切割次数

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

简单
3025

人员站位的方案数 I

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

中等
3027

人员站位的方案数 II

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

困难
3047

求交集区域内的最大正方形面积

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

中等
3102

最小化曼哈顿距离

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

困难
3235

判断矩形的两个角落是否可达

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

困难
3380

用点构造面积最大的矩形 I

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

中等
3382

用点构造面积最大的矩形 II

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

困难
3588

找到最大三角形面积

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

中等
3623

统计梯形的数目 I

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

中等
3625

统计梯形的数目 II

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

困难

关联高频模式

LeetCode 几何题型题解:38题训练路线