#1679 - Max Number of K-Sum Pairs
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. Return the maximum number of such operations you can perform.
| Input | Output |
|---|---|
nums = [1,2,3,4], k = 5 | 2 |
nums = [3,1,3,4,3], k = 6 | 1 |
nums = [2,2,2,2], k = 4 | 2 |