Solutions and code for Hacker Rank challenges