Pergunta de entrevista da empresa Nokia

Problem solving in C and C++. Counter check the solutions that you will submit