Solution to Programming Challenges on interview street