Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void HashTable::hash(double value)
- {
- unsigned int hashValue = hashFunc(value);
- if (this->hashList[hashValue] == nullptr)
- this->hashList[hashValue] = new HashNode(value, nullptr, nullptr);
- else
- {
- while (this->hashList[hashValue]->Next != nullptr)
- this->hashList[hashValue] = this->hashList[hashValue]->Next;
- HashNode *newNode = new HashNode(value, nullptr, nullptr);
- this->hashList[hashValue]->Next = newNode;
- newNode->Prev = this->hashList[hashValue]->Prev;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement