udacity interview problem