Algorithms and data structures in C++