public void add(int index, int element) {
    if (this.size == this.capacity) grow();
    if (index < size) System.arraycopy(this.array, index, this.array, index + 1, this.size - index);
    this.array[index] = element; this.size++;
}
private void grow() {
    this.capacity += this.capacity >> 1;
    int[] newArray = new int[this.capacity];
    System.arraycopy(this.array, 0, newArray, 0, this.size);
    this.array = newArray;
}
public int remove(int index) {
    int removed = this.array[index];
    System.arraycopy(this.array, index + 1, this.array, index, this.size - index - 1);
    this.size--;
    return removed;
}
索引
空闲
占用
拷贝
待添加值  待插入索引  待插入值  待删除索引  动画速度(ms)