← Questions

K closest points to a query location

0
UberCodingLast asked Aug 2026

A coding interview question asked in Uber's coding round, last asked Aug 2026. It tests heaps, geometry and sorting.

Given a list of 2D points and a query location, return the k points closest to the query by Euclidean distance.

Sign in to unlock this question

The full prompt, the worked answer and your own canvas or code with the AI tutor. New accounts get 5 credits: each one unlocks a question for good.

Where it's asked

  • Uber · Coding · Last asked Aug 202660 min · Two rounds; one is often object-oriented design (a parking lot, a meeting scheduler, an expression evaluator) · No AI, except a newer AI-assisted debugging round in some senior loops

What it tests

heaps · geometry · sorting

Your code and the AI tutor open when you unlock this question.