data structure and algo for c++