Arm Interview Question

Problem solving, advanced C++