Maximum sum of a subarray whose ends differ by k
Given an integer array and k, a subarray is good when its first and last elements differ by exactly k. Return the largest sum of a good subarray, or 0 if there is none.
No answer yet. Write the first one; the best answer gets endorsed.
