Since there is very few repeats I would use a STL-map :P. Idea is very
similiar to hash-array and since it's very few repeats easier coding
would recompense additional logn complexity. Anyway there's also
hash_array in STL and it's sometimes faster than usual map. Last time
when I used it u had to:
#include <tr1/unordered_map>
and type:
using namespace std::tr1;
and then type:
unordered_map<string, bool> M;
The nicest thing in unordered_map is already reloaded hashing
operator, what is great advantage to old hash_map.
Anyway few links:
http://www.sgi.com/tech/stl/Map.html STL map with examples
http://www.sgi.com/tech/stl/hash_map.html STL hash_map with examples
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to