面试场景
高频考察问题建模、边界条件与口头表达的清晰度。
常见误区
只背模板不解释为什么,容易在追问里失分。
练习策略
每轮练 3-5 题,固定复盘复杂度和可替代解法。
推荐练习顺序
直线上最多的点数
Find the maximum number of points on a straight line in a 2D plane using array scanning and hash lookup.
矩形面积
Calculate the total area covered by two rectangles using geometry, handling overlaps and avoiding double counting effici…
路径交叉
Determine if a path defined by sequential distances on a 2D plane crosses itself using array and math reasoning.
完美矩形
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 requires creating a uniform random point inside a circle using math and geometry princ…
安装栅栏
Find the perimeter fence of a garden by determining the outermost trees in a set of given tree coordinates.
有效的正方形
Determine if four given 2D points form a valid square using geometric distance checks and vector validation techniques.
最大三角形面积
Find the area of the largest triangle formed by three distinct points on a 2D plane.
矩形重叠
Determine if two axis-aligned rectangles overlap based on their coordinates.
镜面反射
Given a square room with mirrors, find which receptor a laser ray will hit first based on two integers, p and q.
三维形体投影面积
Calculate the projection area of a 3D shape defined by a grid of towers with varying heights.
三维形体的表面积
Solve the Surface Area of 3D Shapes problem using array manipulation and mathematical formulas to calculate surface area…
最小面积矩形
Find the minimum area of a rectangle formed by given points on a 2D plane with sides parallel to axes.
最小面积矩形 II
Find the minimum area rectangle from given points in the X-Y plane, with sides not necessarily parallel to the axes.
最接近原点的 K 个点
Find the k closest points to the origin in a 2D plane using array operations and Euclidean distance calculations efficie…
距离顺序排列矩阵单元格
Compute all matrix cell coordinates sorted by Manhattan distance from a given center using array and math techniques eff…
有效的回旋镖
Determine if three points on a 2D plane form a boomerang, based on distinctness and non-collinearity.
缀点成线
Determine if a series of coordinates form a straight line on a 2D plane using geometry and mathematical principles.
访问所有点的最小时间
Calculate the minimum seconds required to visit all given 2D points in order using optimal diagonal or straight moves.
圆和矩形是否有重叠
Determine if a circle intersects with an axis-aligned rectangle using geometric distance checks efficiently in code.
圆形靶内的最大飞镖数量
Maximize the number of darts on a circular dartboard given dart positions and radius.
服务中心的最佳位置
Find the optimal service center position in a city by minimizing the sum of Euclidean distances to all customers.
可见点的最大数目
Determine the maximum number of points visible from a fixed location within a given angle using a sliding window approac…
统计一个圆中点的数目
Determine how many 2D points lie within multiple circles using array iteration and Euclidean distance calculations effic…
引爆最多的炸弹
Determine the maximum number of bombs that can be detonated by leveraging chain reactions using graph traversal and DFS …
统计圆内格点数目
Count the number of lattice points inside at least one circle in a grid, based on given center and radius data.
表示一个折线图的最少线段数
Determine the fewest lines needed to accurately connect stock price points in a line chart using array and math reasonin…
分割圆的最少切割次数
Calculate the fewest cuts required to divide a circle into n equal slices using math and geometric reasoning efficiently…
人员站位的方案数 I
Calculate how many valid pairs of points can be formed on a 2D plane using array and math enumeration techniques efficie…
人员站位的方案数 II
Calculate all valid placements of people on a 2D grid ensuring Alice can fence herself with Bob without enclosing others…
求交集区域内的最大正方形面积
Find the largest square area that can fit inside the intersection of two or more rectangles in a 2D plane.
最小化曼哈顿距离
Compute the minimum maximum Manhattan distance by removing one point using array math and geometry insights efficiently.
判断矩形的两个角落是否可达
Determine if there is a valid path from the bottom-left to top-right of a rectangle while avoiding circles.
用点构造面积最大的矩形 I
Find the maximum area of a rectangle formed by given points on a plane with unique coordinates.
用点构造面积最大的矩形 II
Find the largest rectangle on a plane using given points while avoiding any interior points and optimizing with math and…
找到最大三角形面积
Find the maximum area of a triangle from 2D coordinates with at least one side parallel to the x-axis or y-axis.
统计梯形的数目 I
Given a list of distinct points, count the number of unique horizontal trapezoids that can be formed by selecting four p…
统计梯形的数目 II
Count Number of Trapezoids II requires scanning point pairs and hashing slopes to efficiently find parallel sides in arr…