You are given an array of integers. Find the maximum contiguous subarray sum. If the array is empty, return 0.
Explanation: The maximum subarray sum is 11, in the subarray [8, 3]
Explanation: The maximum subarray sum is 7, in the subarray [1, 5, -3]
Explanation: The maximum subarray sum is 0 for an empty array
Master coding challenges related to Arrays and solve the Max Subarray Sum problem optimally.
No dry run loaded.
🚀 Practice this problem
Run code, get AI hints & track streak