I'm currently trying to implement a trie in C in order in order to make a speller check (dictionary is taken from a text file loaded into the trie structure).
Here is my current struct for nodes (taken from http://ift.tt/1sBl8Q8):
typedef struct trieNodeTag
{
char key;
struct trieNodeTag *next, *children;
} trieNodeT;
key
being the letter of each word to load in memory.
My question is the following: does that make a difference in memory / speed to use a type int for key ? Is a char treated directly as an int ?
Thank you !
Aucun commentaire:
Enregistrer un commentaire