```
public class Solution {
    public int FindGreatestSumOfSubArray(int[] shu)
    {
        int len = shu.length;

        int dp[] = new int[len + 10];

        dp[0] = 0;
        int max = shu[0];
        for (int i = 1; i <= len; i++)
        {
            dp[i] = Math.max(shu[i - 1], dp[i - 1] + shu[i - 1]);
            max = Math.max(max, dp[i]);
        }

        return max;
    }
}

```