Solutions of the Facebook Hacker Cup problems