Question: Please help!! This is written in code runner. Implement a C++ function to build a new hash table from an existing hash table using a

Please help!! This is written in code runner. Implement a C++ functionto build a new hash table from an existing hash table usinga new hash function called hashSum2. In the new hash table, insertPlease help!! This is written in code runner.

Implement a C++ function to build a new hash table from an existing hash table using a new hash function called hashSum2. In the new hash table, insert the movies at the front of the linked list when the movies hash to the same index. void HashTable::createNewHashTable();//You need to implement this function int hashSum2(std::string x, int s); createNewHashTable//already defined. You will need to call this function in struct Movie{std::string title; Movie *next; Movie(){}; Movie(std::string in_title){title = in_title; next = NULL;}}; class HashTable {public: HashTable(); ~HashTable(); void createNewHashTable(); private: int hashSum(std::string x, int tablesize); int hashSum2(std::string x, int s); int tableSize; Movie * hashTable[10]; Movie * newHashTable[10];};//Returns hashSum2 of input string x by summing every other letter in string int HashTable::hashSum2(string inputString, int hashLen) {int sum = 0; for (int i = 0; i Fight Club => The Matrix Index 1: The Lord of the Rings: The Fellowship of the Ring = > The Lord of the Rings: The Return of the Index 2: Schindler's List = > The Dark Knight = > The Godfather: Part II Index 3: The Good the Bad and the Ugly Index 4: 12 Angry Men Index 5: Pulp Fiction = > Shawshank Redemption Pulp Fiction => Shawshank Redemption Index 6: Index 7: The Godfather = > Inception Index 8: Index 9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!