codingbat solution java version