Inside the Chamber of Coordinates, glowing runes show several coordinate points on a 2D grid.
The treasure lies closest to the origin (0,0).
Given two numeric vectors x and y representing the coordinates of points, return the index of the point nearest to the origin.
If multiple points are equally close, return the smallest index.

Solution Stats

82 Solutions

56 Solvers

Last Solution submitted on Jan 30, 2026

Last 200 Solutions

Solution Comments

Show comments
Loading...