Microsoft interview question

Standard algorithms questions.