Question: PLEASE DO IN PYTHON. I WILL RATE. If two cities have the same distance to the queried city, consider the one with an alphabetically smaller

PLEASE DO IN PYTHON. I WILL RATE. If two cities have thePLEASE DO IN PYTHON. I WILL RATE. If two cities have the same distance to the queried city, consider the one with an alphabetically smaller name ( ie 'ab' Given a list of points, find the nearest points that shares either an x or a y coordinate with the queried point. The distance is denoted on a Euclidean plane: the difference in x plus the difference in y. Input numOfPoints, an integer representing the number of points; points, a list of strings representing the names of each point [i]; Coordinates, a list of integers representing the X coordinates of each point[i]; yCoordinates, a list of integers representing the Y coordinates of each point[i]; numOfQueriedPoints, an integer representing the number of points queried; queriedPoints, a list of strings representing the names of the queried points. Output Return a list of strings representing the name of the nearest points that shares either an x or a y coordinate with the queried point

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!