Microsoft interview question

Write code that find max sum of sub-array.