Pregunta de entrevista de Citi

A bit difficult if you haven't reviewed mathematics before interview.