0296. Best Meeting Point
Last updated
Last updated
**Input:** grid = [[1,0,0,0,1],[0,0,0,0,0],[0,0,1,0,0]]
**Output:** 6
**Explanation:** Given three friends living at (0,0), (0,4), and (2,2).
The point (0,2) is an ideal meeting point, as the total travel distance of 2 + 2 + 2 = 6 is minimal.
So return 6.**Input:** grid = [[1,1]]
**Output:** 1