public class Solution { public int maxSubArray(int[] nums) { int maxSoFar =nums[0],maxEndingHere=nums[0]; for(int i=1;i