Question d’entretien chez Microsoft

Write code that find max sum of sub-array.