Solutions to problems from HackerEarth