Codes for Crack the code interview