Virtu Financial interview question

Q: Solve this