Implement `maxSubArray(nums)` returning the largest sum of any contiguous subarray (Kadane's algorithm).
Run your code to see results.