Pregunta de entrevista de Longview Solutions

How to solve algorithm structure in the interview.