Pergunta de entrevista da empresa Datastraw

Logical and desicion making question