In my program in C++ ...
User types in program string "foo".
I need to compare this string to my strings, in txt files to write: this string is noun! (or adjective...)
I got few TXT files - one file with nouns, 2-nd file with adjectives... but in each file is about 200.000 words.
How I can effectively compare this string "foo" with strings in my files?
What I need to use?
Use TRIE data structure for this. You should need some memory for constructing the data structure. But your objective will be most efficient.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With