added solutions for CTCI in C++