Will you please refer me to any book or online stuff where I can learn more about STL and functions common in practice in C++, along with their explanations?
You discussed that Hashing approach can also be used - well I tried using the simple djb2 string hashing with a lot of different constants/table sizes but always got WA because collisions were not handled. Could you please tell how to go about solving this using hashtables in C++ ?