Fluential interview question

Coding questions, you can solve it by python and C++. I did not get the code problem.