<commit_before>package medium;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;

public class _4SumII {

    /**Although it's tagged with BinarySearch and HashTable, I didn't come up with a good BinarySearch solution, then looked at this post:
     * https://discuss.leetcode.com/topic/67658/simple-java-solution-with-explanation*/
    public static int fourSumCount(int[] A, int[] B, int[] C, int[] D) {
        Map<Integer, Integer> map = new HashMap();
        int result = 0, len = A.length;
        for (int i = 0; i < len; i++){
            for (int j = 0; j < len; j++){
                int sum = A[i] + B[j];
                if (map.containsKey(sum)){
                    map.put(sum, map.get(sum)+1);
                } else {
                   map.put(sum, 1); 
                }
            }
        }
        <commit_msg>remove unused import<commit_after>package medium;

import java.util.HashMap;
import java.util.Map;

public class _4SumII {

    /**Although it's tagged with BinarySearch and HashTable, I didn't come up with a good BinarySearch solution, then looked at this post:
     * https://discuss.leetcode.com/topic/67658/simple-java-solution-with-explanation*/
    public static int fourSumCount(int[] A, int[] B, int[] C, int[] D) {
        Map<Integer, Integer> map = new HashMap();
        int result = 0, len = A.length;
        for (int i = 0; i < len; i++){
            for (int j = 0; j < len; j++){
                int sum = A[i] + B[j];
                if (map.containsKey(sum)){
                    map.put(sum, map.get(sum)+1);
                } else {
                   map.put(sum, 1); 
                }
            }
        }
        
{'fraction_non_alphanumeric': 0.13117647058823528, 'fraction_numerical': 0.012941176470588235, 'mean_word_length': 1.8023064250411862, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6862292', 'n_tokens_mistral': 553, 'n_tokens_neox': 507, 'n_words': 158}