Morgan Stanley Interview Question

leetcode fountain watering garden question