JAVA programming solutions to problems at HackerEarth