package leetcode;

/**
 * https://leetcode.com/problems/max-number-of-k-sum-pairs/
 */
public class Problem1679 {
    public int maxOperations(int[] nums, int k) {
        // TODO
        return 0;
    }

    public static void main(String[] args) {
        Problem1679 prob = new Problem1679();
        System.out.println(prob.maxOperations(new int[]{1,2,3,4}, 5)); // 2
        System.out.println(prob.maxOperations(new int[]{3,1,3,4,3}, 6)); // 1
    }
}

@@ -12,16 +12,65 @@
 tcode;%0A%0A
+import java.util.HashMap;%0Aimport java.util.Map;%0A%0A
 /**%0A * h
@@ -218,15 +218,173 @@
     
-// TODO
+Map%3C/* value */ Integer, /* count */ Integer%3E map = new HashMap%3C%3E();%0A        for (int num : nums) %7B%0A            map.put(num, map.getOrDefault(num, 0) + 1);%0A        %7D
 %0A   

Update problem 1679