InterviewDB Question

Nearest Neighboring City - Find the Closest City Along the Same Axis

Question Details

Round 1 - Coding Problem Given a list of cities, each with unique x and y coordinates, for each city find the nearest city that shares either the same x-coordinate or the same y-coordinate. If no such city exists, return an empty string. Follow-ups H…

Full Details

🔒

Unlock full leaked content

Full insider details, leaked discussions, and candidate experiences.

Get Premium →

Topics

Coding Onsite