Minimum Euclidean Distance Between Points
Updated
Problem statement
Given Cartesian points in points, return the minimum Euclidean distance between two entries with different indices.
Function
minimumEuclideanDistance(points: int[][]) → doubleExamples
Example 1
points = [[0,11],[-7,1],[-5,-3]]return = 4.47213595499958The closest pair is (-7,1) and (-5,-3).
Constraints
2 <= points.length <= 20000.points[i].length == 2.|points[i][j]| <= 10^7.- Results use absolute tolerance
1e-5.
More Luma AI Online Assessment questions
- Build a Gaussian Blur KernelOA · Seen Jun 2026
- Center Crop a Grayscale ImageOA · Seen Jun 2026
- Impute Missing Values and Normalize ColumnsOA · Seen Jun 2026
- Numerically Stable SoftmaxOA · Seen Jun 2026
- Rotate a Rectangular Image ClockwiseOA · Seen Jun 2026
- Triangle Flags from Adjacent ElementsOA · Seen Jun 2026
Similar questions at other companies
- Closest Pair of PointsCitadel · PHONE SCREENCitadel interview questions
- Maximum Points in a Perimeter-Bounded RectangleAmerican Express · OAAmerican Express interview questions
- Best Meeting PointWalmart · OAWalmart interview questions
- Temporal AnomaliesInMobi · OAInMobi interview questions
- HTTP Request RedirectionAmazon · OA
- Count InversionsExpedia · OAExpedia interview questions
- Count InversionsNutanix · OANutanix interview questions
- Maximum Visible DronesAnduril · PHONE SCREENAnduril interview questions
- Generalized N-SumBloomberg LP · ONSITE INTERVIEWBloomberg LP interview questions
- Count Inversions With Merge SortAdobe · PHONE SCREENAdobe interview questions