Implementation of known algorithms and data structures in c++