Monday, February 12, 2018

Find best position to host the party based on Manhattan distance

Feb. 12, 2018

Introduction


I do not expect that I will learn the algorithm from the peer after the mock interview. Actually it is very good experience to learn that the peer can solve the problem using very good reasoning skills, related to quick select algorithm.

For my understanding, it is like applying counting sort or bucket sort, you decide where to place the position, count how many increments and decrements for each move.


Algorithm discussion


Here is the algorithm.

Follow up 

May 8, 2018

The peer got Google full time job starting this May. I am so excited to get connected to him.

June 19, 2018
Here is Leetcode 296.

One of his blogs:
https://blog.csdn.net/xudli/article/details/49420623

Here is blog about geeksforgeeks.com.
https://www.geeksforgeeks.org/sum-manhattan-distances-pairs-points/

No comments:

Post a Comment