Pergunta de entrevista da empresa Brane Enterprises (nslhub)

Write a code for the maximum sum for a contiguous subarray?