Tags: algo 

Rating:

Graph is a spanning tree. Do a depth first search from Daniel's son's POV, counting (and terminating at) stores which a mini Max could reach first.