I am a beginner to C++. Can some one tell me a best data structure in C++ to store all words in a dictionary and find if a word is present in the dictionary. I know hash tables are the best but I dont know which data structure uses them ?
Thank you very much in advance.
Your C++ implementation's standard library may have unordered_set
or hash_set
. They are essentially the same thing; the former is part of the forthcoming C++0x standard and is supported by some of the latest compilers, the latter is from the original SGI STL and is included in many standard library implementations.
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