ValueLabs interview question

*given a programming question* explain how do you solve the problem.