Pregunta de entrevista de Two Sigma

Some coding questions, cannot disclose specifics