Pregunta de entrevista de Coupa Software Inc

Not general question for algorithms.