Java Soluction for Cracking the Coding Interview 150