roll(prevHash, prevWord, newWord) {
    let hash = prevHash;

    const prevValue = prevWord.charCodeAt(0);
    const newValue = newWord.charCodeAt(newWord.length - 1);

    hash -= prevValue;
    hash /= this.base;
    hash += newValue * (this.base ** (newWord.length - 1));

    return hash;
  }
Function that creates hash representation of the word
based on previous word (shifted by one character left) hash value.

Recalculates the hash representation of a word so that it isn't
necessary to traverse the whole word again.

Time complexity: O(1).

@assumption: This function doesn't use modulo operator and thus is not safe since
it may deal with numbers that are bigger than Number.MAX_SAFE_INTEGER. This
function is mentioned here for simplicity and LEARNING reasons.

@param {number} prevHash
@param {string} prevWord
@param {string} newWord
@return {number}