Detonate the Maximum Bombs

Medium · Graphs · about 25 minutes

Asked at Google, Amazon, Airbnb, Meta, Microsoft.

Each bombs[i] = [x, y, r] sits at point (x, y) and, when it goes off, sets off every other bomb within distance r (boundary included); those bombs then trigger others in turn. You get to set off just one bomb by hand. What is the largest number of bombs that can end up exploding?

Related guides