1679. Max Number of K-Sum Pairs
https://leetcode.com/problems/max-number-of-k-sum-pairs
Description
You are given an integer array nums
and an integer k
.
In one operation, you can pick two numbers from the array whose sum equals k
and remove them from the array.
Return the maximum number of operations you can perform on the array.
Example 1:
Example 2:
Constraints:
1 <= nums.length <= 105
1 <= nums[i] <= 109
1 <= k <= 109
ac
Last updated