Accolo interview question

hOW i solve the problem