bool Lookup(const apvector & table, const Name & nn) // precondition: for all 0 <= k < SIZE, either table[k] == NULL/0 // or table[k] is a pointer to a linked list of names // all of which have hash value k // postcondition: returns true if nn is in table; // otherwise returns false { Node * temp = table[Hash(nn)]; while (temp) { if (temp->info == nn) return true; temp = temp->next; } return false; }