Pergunta de entrevista da empresa Citadel Securities

2 coding questions which is basically related to math and it was on tree data structures