Cracking the Code Interview problem solutions