think-cell interview question

C++ and algorithm and complexity