Different Data Structure Implementations in C++