LeetCode
Optimize Water Distribution in a Village
Click
here
for an explanation.