public boolean compute(int[] counts) {
			for (int i = 0; i < counts.length - 1; ++i) {
				if (counts[i] == 1 && counts[i + 1] == 0) {
					counts[i] = 0;
					counts[i + 1] = 1;
					int z = 0;
					for (int j = 0; j < i; ++j) {
						if (counts[j] == 1) {
							counts[j] = 0;
							counts[z++] = 1;
						}
					}
					return true;
				}
			}
			return false;
		}