private void shiftLeafAside(int fromIndex, int destIndex, Array<E> newArray, int level) {

        if (Math.max(fromIndex, destIndex) > array.getSize()) {
            return;
        }

        int sign = (fromIndex < destIndex) ? 1 : -1;

        newArray.setElement(fromIndex + sign * level, array.getElement(fromIndex));

        ++level;

        shiftLeafAside(getLeftChildIndex(fromIndex), getLeftChildIndex(destIndex), newArray, level);
        shiftLeafAside(getRightChildIndex(fromIndex), getRightChildIndex(destIndex), newArray, level);
    }