Virtu Financial interview question

Solve this CS related problem