1class Solution {2 public boolean divideArray(int[] arr) {3 HashMap<Integer, Integer> map = new HashMap<>();45 for (int i : arr) map.put(i, map.getOrDefault(i, 0) + 1);6 for (int i : map.keySet()) {7 if (map.get(i) % 2 != 0) return false;8 }9 return true;10 }11}
WPM •0 •0
ACC •0 •0
TIME •0