CIED Technologies interview question

I was asked to solve programming problems.