Largest Chain Reaction from One Explosion

Asked at Google · Coding Questions · Difficulty: Medium

A field holds several explosive charges, each with a position and a blast radius. Setting off one charge also sets off every charge inside its blast circle, and those set off further charges in turn. You may ignite exactly one charge by hand. Find how many charges explode in total in the best case.

Loading the problem…