Write a function that takes an array and an integer k, and returns the maximum sum of any subarray of size k with all distinct elements?
Login to Submit
Input: [1,-7,-2] Output: 0 Input: 4 Output: 0 Input: [1,-2] Output: 0