Given a list of mines represented as 3-tuples (x, y, radius of explosion) - write a program which takes this input and returns the most destructive mine.
Asked in the CodeSignal coding round stage. Example input of 8 mines; expected output {-2, -2, 3.5}; chain reaction via BFS over mines in radius.
def most_destructive_mine(mines):
mines is a list of tuples (x, y, r).
Return the tuple for the mine that can directly or indirectly trigger the largest number of other mines. If multiple mines destroy the same number, return the one with the smallest index in the input.
def most_destructive_mine(mines):