C++ - Efficient container for large amounts of searchable data?
- by Francisco P.
Hello, everybody!
I am implementing a text-based version of Scrabble for a College project.
My dictionary is quite large, weighing in at around 400.000 words (std::string).
Searching for a valid word will suck, big time, in terms of efficiency if I go for a vector<string> ( O(n) ). Are there any good alternatives? Keep in mind, I'm enrolled in freshman year. Nothing TOO complex!
Thanks for your time!
Francisco