Practice of data structures in c++