[LeetCode] 2461. Maximum Sum of Distinct Subarrays With Length K

1 · Rain Hu · Nov. 7, 2022, 4:36 p.m.
2461. Maximum Sum of Distinct Subarrays With Length K Hardness: \(\color{orange}\textsf{Medium}\) Ralated Topics: Array、Hash Table、Sliding Window、 \(\color{blue}\textsf{Weekly Contest 318}\) 一、題目 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, and All the elements of the subarray are distinct. Return the maximum subarray sum of all the subarrays that meet the cond...