LeetCode
Shortest Distance from All Buildings
Click
here
for an explanation.