Pregunta de entrevista de Uber

Question related to Divide and Conquer.