Microsoft interview question

An easy string coding question.