private void optimize() {
		int length = this.elements.length;
		int cnt = 0;
		int idx = length - 1;
		
		for (int i = 0; i < length && cnt < this.size; ++i) {
			if (this.elements[i] == null) {
				while (this.elements[idx] == null) {
					--idx;
				}
				this.elements[i] = this.elements[idx];
				this.elements[idx--] = null;
			}
			++cnt;
		}
	}