Pergunta de entrevista da empresa Squarepoint Capital

coding question with two pointers