Virtu Financial Interview Question

Solve this CS related problem