Practice problems from HackerRank.com