The task involves determining the maximum number of bombs that can be detonated by choosing to detonate only one bomb. Bomb triggers a chain reaction when detonated, potentially setting off more bombs within its range.
Given an undirected tree, the problem is to find the sum of the distances between each pair of nodes in the tree, and return an array that contains the sum of distances between the node i and all other nodes, in the same order as the input
Given an array of jobs where each job has a start time, end time and a penalty if it is not finished on time, the problem is to find the minimum penalty that can be incurred by finishing the jobs in the order they are given