IMC Trading Interview Question

2 questions. first one - dsa