Codeval solutions in java