int hashFunction(string key) { int hashCode = 0; for (int i = 0; i < key.length(); i++) { hashCode += key[i] * pow(PRIME_CONST, i); } return hashCode; }