← Microsoft questions

Find closest point to a given point

Filed under Microsoft

Given n points in a 2D plane and a target query point, find the closest point to the target point efficiently (avoiding an O(n^2) all-pairs search, and optimizing for single-query or repeated-query…

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Microsoft questions

Collected from public candidate posts and coding forums. Updated Nov 2026.