Accolo Interview Question

hOW i solve the problem