Practicing problems on CareerCup using Java.