Data structures and algorithms in c++