Udacity interview question

Standard data-structure and algorithm questions.