import java.util.HashMap; public class Solution { public int GetNumberOfK(int [] array, int k) { if (array == null || array.length == 0) return 0; // 使用哈希存储出现整数出现的次数,(整数,次数) HashMap<Integer, Integer> map = new HashMap<>(); for (int i = 0; i < array....