Pergunta de entrevista da empresa Bloomberg

Traditional two place arrangement problem