Interviewer was very nice and helped with hints.
// - - - - -
// - W M - -
// - - W M -
// - - - - -
Given matrix, find where to put water fountains so distance between machine is least.
M is machine and W is wall.
Ans: Use hashmap to store visited points by all machines globally and use another hashmaps to store visited points individually per machine.