Algorithm · Microsoft · Medium
Subarray Summation to Equalize Two Arrays Medium · Topics · Company Tags · Hints You are allowed to apply the following modification to an array any number of times: pick any contiguous segment of the array, and replace all numbers in that segment with a single value equal to their total sum. For instance, if you have [2, 4, 5, 6] and you choose the segment [4, 5], the array becomes [2, 9, 6]. You receive two arrays of positive integers, arr1 of length n and arr2 of length…
Checking your access…