Homework/HW05/HashTable.cc
bool HashTable::insert(WordCounter &wordc)
{
    //Start with the assumption that the string in wordc is not already in the hash table.
    bool inserted = true;

    //Resizes the storage vector if needed due to high or low load factor.
    //resize();

    //Compute the hash of the string in wordc and store it for later use.
    int hashVal = hashing(key(wordc));

    //Check if the word in wordc is already in the table.
    if (find(wordc, key(wordc), hashVal))
        //If it is, then set the inserted flag to false.
        inserted = false;
    else
        //If it is not, insert the wordc object in the list at the element specified by the hash
        //method.
        inserted = insert(wordc, hashVal);

    //Return whether the insertion operation was successful or not.
    return inserted;
}
/****************************** insert *************************************************************
Action:         Attempts to insert the passed WordCounter argument into the table. Gets the hash
                index for the key of the passed object, then determines if the key has been inserted
                in the list at that index.  If not, the object is inserted in that list and true is
                returned.  If the key has been used in the table, false is returned.

Parameters:
IN:             WordCounter &wordc, contains a reference to the object that this method will attempt
                to insert into the table.
OUT:            None

Returns:        bool, representing whether the insertion was successful or not.

Precondition:   None
***************************************************************************************************/
insert
Action:         Attempts to insert the passed WordCounter argument into the table. Gets the hash
index for the key of the passed object, then determines if the key has been inserted
in the list at that index.  If not, the object is inserted in that list and true is
returned.  If the key has been used in the table, false is returned.

WordCounter &wordc, contains a reference to the object that this method will attempt
to insert into the table.
OUT:            None

bool, representing whether the insertion was successful or not.

None
insert Action : Attempts to insert the passed WordCounter argument into the table . Gets the hash index for the key of the passed object then determines if the key has been inserted in the list at that index . If not the object is inserted in that list and true is returned . If the key has been used in the table false is returned . WordCounter &wordc contains a reference to the object that this method will attempt to insert into the table . OUT : None bool representing whether the insertion was successful or not . None
bool HashTable::insert(WordCounter &wordc)
{
    bool inserted = true;
    int hashVal = hashing(key(wordc));
    if (find(wordc, key(wordc), hashVal))
        inserted = false;
    else
        inserted = insert(wordc, hashVal);
    return inserted;
}
bool HashTable :: insert ( WordCounter & wordc ) { bool inserted = true ; int hashVal = hashing ( key ( wordc ) ) ; if ( find ( wordc , key ( wordc ) , hashVal ) ) inserted = false ; else inserted = insert ( wordc , hashVal ) ; return inserted ; }
insert
Action:         Attempts to insert the passed WordCounter argument into the table.
insert Action : Attempts to insert the passed WordCounter argument into the table .
//Start with the assumption that the string in wordc is not already in the hash table. //Resizes the storage vector if needed due to high or low load factor. //resize(); //Compute the hash of the string in wordc and store it for later use. //Check if the word in wordc is already in the table. //If it is, then set the inserted flag to false. //If it is not, insert the wordc object in the list at the element specified by the hash //method. //Return whether the insertion operation was successful or not.