Pergunta de entrevista da empresa Jane Street

tree related class design question