Java Solutions to problems from geeksforgeeks.org