crack the code interview solutions in python