Solutions to Hacker Rank