[LeetCode] 2461. Maximum Sum of Distinct Subarrays With Length K - Python
·
알고리즘/LeetCode
난이도: Medium문제 설명You are given an integer array nums and an integer k. Find the maximum subarray sum of all the subarrays of nums that meet the following conditions:The length of the subarray is k, andAll the elements of the subarray are distinct.Return the maximum subarray sum of all the subarrays that meet the conditions. If no subarray meets the conditions, return 0.A subarray is a contiguous ..