IMC Trading Interview Question

Both questions were coding questions.