Pergunta de entrevista da empresa Urban Insight

Complete the following programming challenge.