Hudson River Trading Interview Question

Coding question - very hard