All Posts
Leetcode 2101: Detonate the Maximum Bombs
You are given a list of bombs represented by a 2D array ‘bombs’ where each bomb is described by three integers: [xi, yi, ri]. xi and yi denote the X and Y coordinates of the bomb, while ri is its blast radius. Your task is to find the maximum number of bombs that can be detonated by initiating a detonation of one bomb.
Leetcode 2104: Sum of Subarray Ranges
You are given an integer array nums
. A subarray of nums
is a contiguous sequence of elements. The range of a subarray is defined as the difference between the maximum and minimum elements within that subarray.
Your task is to calculate the sum of the ranges for all possible subarrays in the given array nums
.