Pregunta de entrevista de Two Sigma

Medium to hard Leetcode questions.