Implementations to Hacker Rank problems