Added solution to problem 43 in Java and Racket