public static int singleNumber(int[] A) {
		HashMap<Integer, Integer> hashMap=new HashMap<>();
		for(int i=0;i<A.length;i++){
			if(!hashMap.containsKey(A[i]))
				hashMap.put(A[i], 1);
			else {
				if(hashMap.get(A[i]) == 2)
					hashMap.remove(A[i]);
				else {
					hashMap.put(A[i], hashMap.get(A[i])+1);
				}
			}
		}
		Iterator iter = hashMap.entrySet().iterator();
		Map.Entry entry = (Map.Entry) iter.next();
        return (int) entry.getKey();
    }