Ads Hash
Ads Hash
Problem Statement: Implement all the hashing taking and also collision
#include <stdio.h>
#include <stdlib.h>
#define TABLE_SIZE 10
if (ht->table[index] == NULL) {
ht->table[index] = newNode;
} else {
struct Node* current = ht->table[index];
while (current->next != NULL) {
current = current->next;
}
current->next = newNode;
}
}
return 0;
}
OUTPUT: