C++ Help
1) Write a program that uses a class HashedDictionary, whichuses separate chaining to resolve collisions. Use the hash functionh(x) = x mod tableSize and the algorithm that involves Horner’srule about hash functions, to convert a variable into an integerx.
2) Because you add an entry to the dictionary only if its searchkey is not already present, does the time required for an additionincrease?
/** @file HashedDictionary.cpp */
// Separate chaining resolves collisions
// PARTIALLY COMPLETE
template <class KeyType, class ItemType>
bool HashedDictionary<KeyType, ItemType>::add(constKeyType& searchKey, const ItemType& newItem)
{
// Create entry to add to dictionary
HashedEntry<KeyType, ItemType>* entryToAddPtr =
new HashedEntry<KeyType, ItemType>(newItem, searchKey);
// Compute the hashed index into the
PayPal Gateway not configured
PayPal Gateway not configured