My resolution to http://tech.wonga.com/puzzle