public static boolean sameValues(int[] array1, int[] array2) {
		HashMap<Integer, Integer> m1 = new HashMap<Integer, Integer>();
		for (int n : array1) {
			int before;
			if (m1.get(n) == null) {
				before = 0;
			} else {
				before = m1.get(n);
			}
			m1.put(n, before + 1);
		}

		for (int n : array2) {
			if (m1.get(n) == null || ( m1.get(n) != null && m1.get(n) == 0 )) {
				return false;
			} else {
				m1.put(n, m1.get(n) - 1);
			}
		}
		return true;
	}