Code solutions to Facebook Hacker Cup Problems