Problem · Greedy
Find Minimum Time to Defuse All Bombs (For off-campus 2025 batch hiring :)
Learn this problemProblem statement
Another question about defusing bombs - uber-defuse-the-bombs
There are N bombs in a row, each bomb 💣, say i (0 <= i < N) has a detonation time of xi and time to defuse it is yi. Find the minimum time to defuse all the bombs if possible, otherwise -1.
The first line of input is the number of bombs N. The second line consists of N space separated values denoting the time to defuse the bombs. The third line consists of N space separated values denoting the time for detonation of bombs.
Function
findMinimumTimeToDefuseAllBombs(defuseTime: int[], detonationTime: int[]) → intExamples
Example 1
defuseTime = [2, 1, 3, 1]detonationTime = [4, 9, 8, 2]return = 7🐻❄️
More Uber problems
- Minimum Refueling StopsONSITE INTERVIEW · Seen Jul 2026
- Last Truck to Leave the LaneOA · Seen Jul 2026
- Chain of CommandOA · Seen Jul 2026
- Jump Game with Prime-3 StepsOA · Seen Jun 2026
- Total Palindrome Substring CostOA · Seen Jun 2026
- Earliest Time All Users Are ConnectedPHONE SCREEN · Seen May 2026
- Tournament Rounds by RankPHONE SCREEN · Seen May 2026
- Farthest Seat AssignmentONSITE INTERVIEW · Seen May 2026