Untitled
Untitled
#include <ctype.h>
#include <stdio.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <strings.h>
#include "dictionary.h"
int sizes = 0;
// Hash table
node *table[N];
node *checkp;
// Returns true if word is in dictionary, else false
bool check(const char *word)
{
checkp = table[hash(word)];
while(checkp != NULL)
{
if(!strcasecmp(checkp->word, word))
{
return true;
}
checkp = checkp->next;
}
return false;
}