function moveToFront(v, index) {
    let /** @type{number} */ value = v[index];
    for (; index > 0; index--) {
      v[index] = v[index - 1];
    }
    v[0] = value;
  }
@param {!Int32Array} v
@param {number} index
@return {void}