Implementation of some interesting data structures in C++ or Python