ValueChecker interview question

How did you resolve the coding problem