2829. Determine the Minimum Sum of a k-avoiding Array
You are given two integers,
n
andk
.An array of distinct positive integers is called a k-avoiding array if there does not exist any pair of distinct elements that sum to
k
.Return the minimum possible sum of a k-avoiding array of length
n
.
1 | class Solution { |