Advertisement
Guest User

Untitled

a guest
Feb 26th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.44 KB | None | 0 0
  1. // declares a dictionary
  2.  
  3. #ifndef DICTIONARY_H
  4. #define DICTIONARY_H
  5.  
  6. #include <stdbool.h>
  7.  
  8. // maximum length for a word
  9. #define LENGTH 45
  10.  
  11. // our dictionary will be a trie
  12. struct Trie
  13. {
  14.     int leaf;   // 1 when node is a leaf node
  15.     struct Trie* character[LENGTH];
  16. };
  17.  
  18. bool check(struct Trie* dictionaryTrie, char* str);
  19. void addWord(struct Trie *dictionaryTrie, char* str);
  20. struct Trie* emptyTrieNode();
  21.  
  22. #endif // DICTIONARY_H
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement