Answer to CrackingThe Coding Interview questions in python