Data Axle interview question

Coding related questions c++ and logic