Pergunta de entrevista da empresa Two Sigma

array sorting and recursion type question