This program uses the Trie data structure or the prefix tree to suggest strings based on input words and a search key. For example, if the input words are ["someone","help","me","i","am","in","danger","this","is","not","a","joke","haha","just","kidding","pleasehelp"] and the search key is "h", then the output will be ["help,"haha"], because two words in the input array start with h. This is not limited to a single character, for example, if the input words are ["send","help","fast","cast","car","caste"] and the search key is "cas", then the output will be ["caste","cast"]. The format for input is: [program] [input words] [search key]. The program is prone to memory leaks as this is just an example of how prefix trees can be used in real life situations.
Dfmaaa/Trie-suggestion-in-C
This program uses the Trie data structure or the prefix tree to suggest strings based on input words and a search key.
CGPL-3.0