SteveSun's Java code for CtCI