JavaScript simple BFS explained
For every bomb we build a list of bombs that will detonate if current bomb will detonante.\nStart dfs for every bomb and count how many bombs will finally deton
For every bomb we build a list of bombs that will detonate if current bomb will detonante.\nStart dfs for every bomb and count how many bombs will finally detonate if current bomb will detonate first.\nStore the max achived number of bombs.\n```\nvar maximumDetonation = function(bombs) {\n    const n = bombs.length\n    let map = new Map()\n\t// For every bomb build list of affected bombs\n    for(let i = 0; i < n; i++){\n        map.set(i, [])\n        for(let j = 0; j < n; j++){\n            if(i === j){\n                continue\n            }\n            let b1 = bombs[i]\n            let b2 = bombs[j]\n            if(willDetonateBomb(b1[0], b1[1], b1[2], b2[0], b2[1], b2[2])){\n                const a = map.get(i)\n                a.push(j)\n            }\n        }\n    }\n    \n    let max = 0\n\t// run BFS for every bomb\n    for(let i = 0; i < bombs.length; i++){\n        const queue = [i]\n        const visited = new Set()\n\n        while(queue.length){\n            let current = queue.shift()\n            \n            if(!visited.has(current)){\n                visited.add(current)\n                const ch = map.get(current)\n               \n                ch.forEach(c => {\n                    if(!visited.has(c)){\n                        queue.push(c)\n                    }\n                })\n            }\n        }\n        \n        max = Math.max(visited.size, max)\n    }\n    \n    return max\n};\n\nfunction willDetonateBomb(x1, y1, r1,x2, y2, r2)\n{\n    let distSq = (x1 - x2) * (x1 - x2) +\n                 (y1 - y2) * (y1 - y2)\n    let radSq = r1 * r1\n    if (distSq <= radSq)\n        return true\n    return false\n}\n\n\n```
['Breadth-First Search', 'JavaScript']