Advertisement
Guest User

Untitled

a guest
Dec 11th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.22 KB | None | 0 0
  1. void HashTable::remove(int key)
  2. {
  3.     for (int i = 0, hash = i % reserveSize; i < reserveSize; i++) {
  4.         if (table[hash] != NULL && table[hash]->getKey() == key)
  5.             table[hash] = NULL;
  6.         hash = (hash + 1) % reserveSize;
  7.     }
  8. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement