Microsoft interview question

String manipulation. Array sorting. Summation.