Hello all , I need one help , we have N coordinates given, and we have Q queries of a given point find the min or max Manhatten distance with a point in each query
No update query only answer query .
for each query my approach is O(N) , obviously, I tried to read the below links but was not able to find what I have to do.
Link2 - MDIST - Editorial