Entelect interview question

How did you solve the coding problem?