← Samsung questions

Shortest of the longest distance to rare-element locations

Filed under Samsung

Given a square matrix of size N x N (1=road, 0=no road) and K rare-element locations, find a coordinate (r, c) such that the maximum distance from (r, c) to any rare-element location is minimized…

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 Samsung questions

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