Question: When I try to chain together some nodes I keep getting an error. How can I fix my code to chain together without causing collision.
When I try to chain together some nodes I keep getting an error. How can I fix my code to chain together without causing collision.

Song* HashTable: :getElement (string songName, int& x, int& y) //return a pointer to the song with the given title //x is the index in bucketArray //y is the index in the bucket linked list //print error message if song not found int index = hashFunc(songName) ; * = index; y = 0; BucketNode* current = bucketArray [index].head; while (current != nullptr) { if (current->thissong->getTitle() == songName) { return current->thissong; current = current->next; y++; cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
