Fundamentals/Nearest Cities
← PrevNext →
Given arrays of city names with x and y coordinates and a list of query city names, return for each query the nearest city sharing the same x or y coordinate (closest by Manhattan distance, ties broken alphabetically), or null if none.