Solution code of Cracking the coding interview questions