Hudson River Trading interview question

Classic coding question on python