My code for Cracking the Code Interview