2834. Find the Minimum Possible Sum of a Beautiful Array
You are given positive integers
nandtarget.An array
numsis beautiful if it meets the following conditions:
nums.length == n.numsconsists of pairwise distinct positive integers.- There doesn’t exist two distinct indices,
iandj, in the range[0, n - 1], such thatnums[i] + nums[j] == target.Return the minimum possible sum that a beautiful array could have.
1 | class Solution { |