string-hash.c
void Insert_StrHash(StrHash table, char *str, int v1, int v2, int congestion, int length)
{
    if (table->curr >= (double)(table->cap - 1) / (double)2)
    {
        unsigned long int new_cap = next_prime(table->cap * 2);
        Rehash_StrHash(table, new_cap);
    }

    unsigned long int index = Str_Hash(str, table->cap);

    __insert_StrHash(table->bkt_arr, str, index, table->cap, v1, v2, congestion, length);
    table->curr++;
}
//Inserting into the Hash Table.
Inserting into the Hash Table.
Inserting into the Hash Table .
void Insert_StrHash(StrHash table, char *str, int v1, int v2, int congestion, int length)
{
    if (table->curr >= (double)(table->cap - 1) / (double)2)
    {
        unsigned long int new_cap = next_prime(table->cap * 2);
        Rehash_StrHash(table, new_cap);
    }
    unsigned long int index = Str_Hash(str, table->cap);
    __insert_StrHash(table->bkt_arr, str, index, table->cap, v1, v2, congestion, length);
    table->curr++;
}
void Insert_StrHash ( StrHash table , char * str , int v1 , int v2 , int congestion , int length ) { if ( table -> curr >= ( double ) ( table -> cap - 1 ) / ( double ) 2 ) { unsigned long int new_cap = next_prime ( table -> cap * 2 ) ; Rehash_StrHash ( table , new_cap ) ; } unsigned long int index = Str_Hash ( str , table -> cap ) ; __insert_StrHash ( table -> bkt_arr , str , index , table -> cap , v1 , v2 , congestion , length ) ; table -> curr ++ ; }
Inserting into the Hash Table.
Inserting into the Hash Table .