Leetcode 296. Best Meeting Point
Given a grid of homes (1s) find a meeting cell that minimizes the total Manhattan distance from all homes. Key insight: Manhattan distance is separable by rows and columns, so reduce to two 1D problems and choose the median row and median column to minimize total distance.
Asked at:
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Mid October, 2024
Mid-level
Minimum cost to delete all leaf nodes from a weighted binary tree, with the option to delete non-leaf nodes as well to minimize operations
Hello Interview Premium
Your account is free and you can post anonymously if you choose.