Domanda di colloquio di Citadel Securities

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