Some data structure codes using c++